motdotla / node-lambda

Command line tool to locally run and deploy your node.js application to Amazon Lambda
BSD 2-Clause "Simplified" License
1.36k stars 185 forks source link

node-lambda and Webpack #383

Open merland opened 7 years ago

merland commented 7 years ago

From the readme:

The --prebuiltDirectory flag is useful for working with Webpack for example. It skips npm install --> production and post_install.sh and simply packages the specified directory.

Where can I find more info about how to configure Webpack for use with node-lambda and the prebuiltDirectory flag? Simply placing the Webpack bundle.js in the prebuiltDirectory won't work. Anyone have an example?

johnpangalos commented 7 years ago

Hey,

So there are a few little setup config values you are going to need to set.

In Webpack

In your node-lambda .env/deploy-env

This let me run the script for testing. Still have to deploy my script so I'll update if there is anything I missed.