The serverless-webpack plugin removed their own 'serve' method in v3. They recommended integrating with serverless-offline, so this PR will update everything to
work locally with the new method.
Changes
Changes the alias for npm start from sls webpack serve to sls offline run
Changes index.js to handler.js
Adds an associated output object to the webpack config to make sure it bundles everything into /.webpack/handler.js. In the new version of serverless-webpack, it was defaulting to main.js, so since I had to override it anyway, I decided to make it hander.js to be consistent with other examples.
Updates the handler event in serverless.yml
To make it possible for a single project to contain multiple probot plugins with different handlers, this now exports the example plugin as autoResponder.
I'll deploy this to Lambda and update tcbyrd-probot to verify before merging.
The serverless-webpack plugin removed their own 'serve' method in v3. They recommended integrating with serverless-offline, so this PR will update everything to work locally with the new method.
Changes
npm start
fromsls webpack serve
tosls offline run
index.js
tohandler.js
output
object to the webpack config to make sure it bundles everything into/.webpack/handler.js
. In the new version of serverless-webpack, it was defaulting tomain.js
, so since I had to override it anyway, I decided to make ithander.js
to be consistent with other examples.serverless.yml
autoResponder
.I'll deploy this to Lambda and update tcbyrd-probot to verify before merging.