-
Notifications
You must be signed in to change notification settings - Fork 418
Allow to skip sourcemaps from the package #470
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hello guys! My webpack config generates map files as well as report.html files from the bundle analyzer plugin. These get bundled thus more than doubling the size of my lambda packages. One workaround I tried was to force the path of source map to a different folder. However this does not work for the bundle size report with multiple entry points as it is not compatible with qualifiers such as [file]. I also tried adding entries in a .gitignore file so that npm does not package them but that does not work either. It would be great if I could just tell serverless webpack to ignore those files. Thanks! |
I have this same problem. It's wonderfully ironic that I wanted to analyze the bundle size to make it smaller, but the |
We do have an option Can this solve your problem? |
That seems to fix it for me on v5.5.0 thanks!
|
This is a Feature Proposal
Description
Allow filtering files after webpack runs but before packaging.
When you have source maps enabled, source-maps get bundled in the deployment package (zip file) along with the compiled js bundle.
If you're using a separate Error Reporting system like Sentry you don't need to upload the source maps in the package zip file. This reduces the final package zip size by ~ 50%.
Why not disable source-maps in webpack?
If we do that, then we'll have to build once again after packaging/deploy to get the source-maps to upload to Sentry.
P.S. I don't mind sending a PR for this, I just want to use this issue to discuss the feature
Additional Data
The text was updated successfully, but these errors were encountered: