3 ms·
Wait so you automatically deploy the lambda dependencies for me. The other issue I run into is occasionally you have to split npm packages into different layers
by offtop5 6y ago
Wait so you automatically deploy the lambda dependencies for me. The other issue I run into is occasionally you have to split npm packages into different layers when you deploy lambdas. I don't have time personally to contribute, but I hope you're able to develop this into something which becomes a part of my workflow.
- jayair 6y agoSo the `sst start` command fires up a local environment but it doesn't deploy your functions. Instead it'll run it locally when it gets invoked. But when you `sst deploy` it, we'll package your functions. To do this we use esbuild (https://esbuild.github.io https://esbuild.github.io), it's like Webpack but 10x faster. It'll generated a single js file that should be fairly small and you shouldn't have to use Layers. However, this isn't bullet proof. There are some dependencies that are not compatible with esbuild/webpack, and you'll end up having to zip them up as a directory. That's something we are going to work to improve in the future.