Closed JL102 closed 1 year ago
Hi @JL102. It shouldn't need to be includes as part of the build process within index.js all node modules are bundled by es build into the one file
Oh you're right. I need to figure out what's going wrong..... Now it's giving me an error "result not defined" and I dunno why it's changed.
Wish there was a way to see a stack trace.
Hiya,
When uploading with
serverless deploy
(and/or withserverless deploy function --function svelte && serverless deploy function --function cfLambda && serverless s3deploy
), it seems that it doesn't include node_modules in the uploaded content. This leads to all of my imported modules failing to load.Example: (this is my database utilities package)![image](https://user-images.githubusercontent.com/11487870/215231855-44c99a0a-b7ab-4339-8798-68fa6113d1d3.png)
Is there something I can do during the build step to get node_modules included in the build output? Does esbuild support some sort of tree shaking where it includes only the dependencies that are needed?