Open madmod opened 8 years ago
I am having the same issue, could it be that the optimizer doesn't run when ran locally? Maybe there needs to be a flag or something to allow it?
I currently use the serverless-serve plugin to workaround the issue which has an option to use Babel for ES6 and works with the lib
folder.
Yeah I've just come up against this problem, too. As much as I love writing in ES6 syntax, I think I'll just switch back until the Serverless team (who are doing an incredible job, by the way!) are able to get around to this. :)
If you just want to check the optimised output, you should also take a look at https://github.com/HyperBrain/serverless-package-plugin
When I try
sls function run ...
I get the errorServerless: SyntaxError: Unexpected token import
whenever I reference my files in my componentslib
folder which are ES6. Deploying to AWS works fine but I am unable to test locally. Unfortunately running with--debug
does not give any more info about the error.