-
Notifications
You must be signed in to change notification settings - Fork 219
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
Can't run Karma tests, "Use of reserved word 'import'" #243
Comments
I think you need to provide a For instance, I use the following: loader: 'babel-loader',
options: {
presets: [
['es2015', {modules: false}]
]
} I am using webpack 2, however so the config syntax is different. Also, I'd recommend updating your karma install, but not sure that matters in this case. |
I had a similar issue reported - #297.
should make it work. |
@nitinsurana I'm sorry, but I cant understand. If webpack config file exports a function which depends of env of argv argument the hack above will not work. You will have to do something like this: |
@sagorshkov you're right. The Karma CLI arguments needs to be parsed & passed if required in |
I'm submitting a bug report
Webpack version:
^1.13.1
Webpack Karma version:
^1.7.0
Karma version:
^0.13.22
Please tell us about your environment:
Windows
Browser: [PhantomJS2]
Current behavior:
I get the error "SyntaxError: Use of reserved word 'import'" when trying to run my tests. It seems Babel never transpiles my code.
Expected/desired behavior:
To not get any errors :P
karma.conf.js
webpack.test.js
js/tests.webpack.js
Is there something wrong with the loader I am using? I have tried for 2 days to get this to work, I've read every issue I can find regarding this on Stack overflow but whatever I do it doesn't want to work :( If anyone can help me with this I will be eternally grateful.
The text was updated successfully, but these errors were encountered: