Meteor Angular2 babel - source map generation
Hello,
I'm working on a project using Meteor, Angular2, and babel (among others) using IntelliJ, in windows. After upgrading our meteor version to 1.3.1, sourcemaps are no longer being generated properly. I doubt anything in meteor is causing this, only mentioning for context.
I've followed this tutorial: http://blog.jetbrains.com/webstorm/2015/05/ecmascript-6-in-webstorm-transpiling/ and have a File Watcher setup, babel-cli and babel-preset-es2015 installed, and a .babelrc file in the root dir. When the file watcher runs, I'm getting this error:
SyntaxError: {path omitted}/app.js: Unexpected token (55:0)
53 |
54 |
> 55 | @Component({
| ^
My guess is that the babel compiler isn't finding angular2, but I haven't been successful in finding info on how to solve that problem.
Any help would be awesome! (even if it is the end of the day on friday)
Please sign in to leave a comment.
Seems Babel throws errors on ES7 decorators (and they are, indeed, not a part of es2015 preset). See https://babeljs.io/docs/plugins/transform-decorators/, http://technologyadvice.github.io/es7-decorators-babel6/ for hints
I'm, however, not sure if you need to pre-compile ES6 for Meteor 1.3 using Babel file watcher, as Meteor provides full support for ES2015 modules...