StackToolbox / aws-sam-webpack-plugin

A Webpack plugin to replace the build step for SAM CLI
MIT License
147 stars 29 forks source link

Improve webpack build performance #56

Closed MarsianMan closed 3 years ago

MarsianMan commented 3 years ago

Right now filename seems very coupled to the entry point template. I would like to use conventional webpack caching/build optimizations but not sure how to integrate into this plugin without breaking. Any help would be appreciated

Webpack guides

https://webpack.js.org/guides/caching/ https://webpack.js.org/guides/build-performance/

MarsianMan commented 3 years ago

It turns out, this also affects stack traces when errors are thrown in lambdas making it much more difficult to figure out errors because everything boils down to some line and column in app.js and that is even with source maps support in AWS.

buggy commented 3 years ago

@MarsianMan I've been looking at the chunk loading for the dynamic import issue. Unfortunately it's incompatible with the way the plugin currently works as Webpack only supports one output path.