-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'unexpected token export' after updating from beta.13 to 2.0.1 #220
Comments
same here -- webpack 1.13.2, angular 2.0.2 -- problem appears to be in the non-bundle files, seems like they are exported as es6 and webpack doesn't like the incompatible syntax. worked fine with systemjs, but stuck unable to proceed with webpack update: attempted to get webpack to use babel-loader for angular2-modal files specifically, but either i'm doing it wrong or it's not working -- if someone has a working config for using babel-loader with the es6 files and webpack, pls post |
I have the same issue, anyone got a solution yet? |
same problem here |
Solution for me was:
|
i ended up using 6to5-loader on just the angular2-modal files and that worked. i would still request that the owner of the repo include es5 .js files for those using webpack or other build systems for maximum compatibility and reduction of overall headaches -- also would let me remove a couple otherwise useless packages from my project. :) |
for anyone still having the issue and not familiar with webpack, here is the complete config that I use:
This alone is sufficient, there is no need to change |
I have this issue too. Solution above works for some browsers but not in IE EDIT - Nevermind, @paradite 's solution does work in IE (and other browsers). Thanks! |
What could I be doing wrong with @peradite's fix? I'm getting the following error in the console
angular : 2.1.0 |
@synapze maybe it is due to the new angular version. I am using:
|
^ The babel loader still works for me using angular 2.1.0, angular2-modal 2.0.1. @synapze how are importing angular2-modal into your angular app? Also, make sure to put the babel-loader after your typescript/angular2-template loaders in the webpack config |
@lailavinson sounds like I might need to create a plunkr to work this out. Hopefully it's just the way im importing the angular2-modal. See below in regards to your questions:
Hopefully that all makes sense. Thanks for the assistance. |
@synapze Are you using "babel-preset-es2015"?
|
@stephandesouza nope, i was using
I installed
however I still get the same problem. If its working for some of you it must be the way i've wired it up in my existing ng2 app. Going to create plunkr and work it out. |
Consolidated in #244, please come help and replay there. |
[ ] bug report
[ ] feature request
[x] question about the decisions made in the repository
After updating from beta.13 to 2.0.1 I get 'unexpected token export'. What do I have to change in order to make this work again?
The text was updated successfully, but these errors were encountered: