serverless-plugin-optimize icon indicating copy to clipboard operation
serverless-plugin-optimize copied to clipboard

Expose browserify sourcemap feature in plugin interface.

Open tmaslen opened this issue 3 years ago • 5 comments

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

tmaslen avatar Mar 21 '21 09:03 tmaslen

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.

tmaslen avatar Mar 21 '21 09:03 tmaslen

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

J4YF7O avatar Nov 14 '21 10:11 J4YF7O

Want

Rayyan98 avatar Dec 28 '22 07:12 Rayyan98

I think it's not going to happen We forked it.

ea-tal avatar Dec 28 '22 08:12 ea-tal

Yes, just saw on npmjs that it is no longer maintained. Anyway, is your commit above prod ready ?

Rayyan98 avatar Jan 05 '23 17:01 Rayyan98