Description
This issue is a PSA and to track future improvements to minimize lambda size.
These are dev/build deps that gets bundled, we should remove these during bundling... but for now, if you want to reduce the lambda size, manually remove them prior to deployment.
'@esbuild',
'@swc/core-darwin-arm64', // 33MB!
'esbuild',
'webpack',
'uglify-js',
'@webassemblyjs'
There be more, but these are the ones that take up the majority of the bloat.
NOTE: after attempting to programmatically setting this, it was too brittle to correctly handle due to the config having potential functions, which is not possible to stringify/parse the user file. And since next build
runs on a child thread, we can't set the next.config at runtime.
Metadata
Metadata
Assignees
Labels
No labels