Skip to content
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

^1.1.1 fails to transpile with webpack ^3.5.4 #202

Open
Steffan-Ennis opened this issue Sep 20, 2017 · 1 comment
Open

^1.1.1 fails to transpile with webpack ^3.5.4 #202

Steffan-Ennis opened this issue Sep 20, 2017 · 1 comment

Comments

@Steffan-Ennis
Copy link

Fails to tranpile with webpack 2 and Karma.

[email protected] , [email protected], [email protected]

Property local of ImportDefaultSpecifier expected node to be of a type ["Identifier"] but instead got "CallExpression" error on all imported modules

karma.config.js

....
module  : {
        noParse : [
          /\/sinon\.js/
        ],
        rules : webpackConfig.module.rules.concat([
          {
            test   : /sinon(\\|\/)pkg(\\|\/)sinon\.js/,
            loader : 'imports-loader?define=>false,require=>false'
          },
          {
            test    : /\.(js|jsx)$/,
            exclude : [
              /node_modules/,
              /lib/
            ],
            loader  : 'babel-loader',
            options: {
              presets: ['es2015', 'stage-0', 'react', 'airbnb'],
              plugins : [
                'rewire',
                'transform-runtime',
                'transform-decorators-legacy',
              ],
            }
          },
          {
            test    : /\.(js|jsx)$/,
            include: [/lib/],
            exclude: [/node_modules/],
            loader  : 'babel-loader',
            options: {
              presets: ['es2015', 'stage-0', 'react'],
              plugins : [
                'rewire',
                'istanbul',
                'transform-runtime',
                'transform-decorators-legacy',
              ],
            }
          },
        ])
      },
...

Rolling back to 1.0.0-rc-4 seems to work

@cuijing1031
Copy link

I got the same error message. It was because i uesd babel-transform-imports which will change the ImportSeicifier to the importDefaultSpecifier. When i removed babel-transform-imports , it worked well again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants