Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Does not seem to work with babel #46

Open
tituswoo opened this issue Feb 5, 2017 · 2 comments
Open

Does not seem to work with babel #46

tituswoo opened this issue Feb 5, 2017 · 2 comments

Comments

@tituswoo
Copy link

tituswoo commented Feb 5, 2017

Love this plugin. However I seem to be having some issues with the plugin/preset run ordering... Given the following .babelrc file:

{
  "presets": ["react", "es2015", "stage-0"],
  "plugins": [
    [ "webpack-alias", { "config": "${PWD}/webpack.config.babel.js" } ]
  ],
  "ignore": [
    "dist/*"
  ]
}

I get the following error when running babel src -d dist in my terminal:

Unexpected token import

What's weird though is if I remove the webpack-alias plugin, everything compiles correctly. Interestingly, if I use webpack-alias with node-babel, it also works. Only when I use babel from the babel-cli package do I get the error.

@tituswoo tituswoo changed the title Does not seem to work with babel Does not seem to work with babel Feb 5, 2017
@Zaktus
Copy link

Zaktus commented Aug 9, 2017

Same problem, can not run SSR :(

@feifanzhou
Copy link

Workaround: Use babel-plugin-module-resolver (which appears to be maintained). You'll have to duplicate the config, but it actually works

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

No branches or pull requests

3 participants