serverless-plugin-optimize
serverless-plugin-optimize copied to clipboard
Expose browserify sourcemap feature in plugin interface.
This feature allows users to output a sourcemap with the generated minified file.
This will then lead to stack traces pointing to lines in the original source files, this makes working on errors much nicer.
Source maps with NodeJS in Lambda is available from version 12, to configure it you need to also enable the NodeJS option using an environment variable like this: NODE_OPTIONS: --enable-source-maps
By default browserify generates an inline sourcemap data URL and adds it into the minified script.
If you're not happy with this I can make it generate an external source map.
It is a pity that this PR does not progress. It would be very useful especially with reporting tools such as Sentry.
Thks for it @tmaslen
Want
I think it's not going to happen We forked it.
Yes, just saw on npmjs that it is no longer maintained. Anyway, is your commit above prod ready ?