Open asankagit opened 4 years ago
@asankagit Are you saying that changes to the functions aren't appearing or that changes to your SAM project aren't appearing?
yes I have configured my webpack.config.js and package.js as above
@asankagit Maybe you can achieve this by using two terminals.
## 1st terminal
npm run build
## 2nd terminal
sam local start-api
@asankagit One solution could be to use something like concurrently like I've used on my boilerplate
The reason for the initial npm run build
is to ensure the container doesn't start up with old files or an empty directory.
Webpack watch does seem to work for me. The slowness makes it hard to tell if latest changes are completed or still a in progress. Sometimes I could see a build complete just as I get ready to run, but it was actually a previous build that had not finished but did not have latest changes.
I found it more efficient to manually run the build than keep wondering if I needed to wait longer for the "latest" change.
I use
aws-sam-webpack-plugin
with webpack to build the files.webpack.config.js
instead of using
sam buld
I usenpm run build
in package.json
although webpack rebuild the changes, it does not appear when
sam local start-api
is running, I am looking help for configure to appear changes