Welcome, and thanks in advance for your help!
we are using Babel to transform ES6 modules (static imports and dynamic imports).
you have several options:
- point your
serverless.yml
plugin entry point tosrc/main.js
(https://github.com/dherault/serverless-offline/blob/master/src/main.js and uncomment the block betweenuse strict
andmodule.exports
. that way, babel/register will compile es6 module syntax on the fly.
(as an alternative you can point the entry point to the package.json of the plugin and change main
to src/main.js
)
service: foo
plugins:
- ../../../src/main.js
# - ../../../ alternative: point to package.json
provider:
memorySize: 128
name: aws
# ....
- run the build step ahead of running the plugin. in that case don't uncomment anything in
main.js
!
npm run build
point your serverless.yml
plugin entry to the build folder: ./dist/main.js
(see 1. on how to)
We're using Prettier, ESlint and the Airbnb preset.
npm run lint
npm test
npm run test:cov