Hey guys, just a follow-up to our Serverless Stack Tutorial (http://serverless-stack.com) that I posted about recently. We noticed that some folks were using our demo repos to get started on their projects. So we created a simple Serverless service (https://github.com/AnomalyInnovations/serverless-es7) that automatically adds support for ES7 async/await. It also uses sourcemaps to print out accurate error messages.
Thanks Frank! Being a newcomer to webpack and serverless myself, I have already started playing around with this template you created. I also upgraded babel-preset-es2015 to babel-preset-env and set { modules: false } to improve tree shaking.
after some troubleshooting i found out that I get import error when I do "serverless deploy function -f functionName"
if i just do serverless deploy it works fine.
may be if we can have an option of offline development that could help
I tried offline plugin and when I tried to start offline
it give me error
any I idea how can I add offline to es7 template ?
I see that sls webpack serve is working for local development but when I try to pass data on body using post method I don’t see it on event,body
when when I was working with offline pluing i was able to read it using event.body
offline plugin does not work as the plugin does not transpile ES7 code and it will throw syntax errors. It is very unfortunate because the plugin does a really good job at mocking API Gateway with very realistic event object.
And you are right, sls webpack serve does not seem to set event.body properly. I opened a ticket here.
Ideally it would be nice to get offline plugin to work with babel. I haven’t used offline plugin too much, and wonder how they handle identity when using IAM and User Pool authorizers.