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

Can't load webpack ES6 config #164

Open
vinhlh opened this issue Jun 2, 2017 · 1 comment
Open

Can't load webpack ES6 config #164

vinhlh opened this issue Jun 2, 2017 · 1 comment

Comments

@vinhlh
Copy link

vinhlh commented Jun 2, 2017

Failed to start server:
/Users/vinhlh/my-project/webpack/config.dev.babel.js:1
(function (exports, require, module, __filename, __dirname) { import webpack from 'webpack'
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at getResolver (/Users/vinhlh/Library/Application Support/Sublime Text 3/Packages/tern_for_sublime/node_modules/tern/plugin/webpack.js:27:67)
@nickw444
Copy link
Contributor

nickw444 commented Jun 3, 2017

I believe this has to do with this library not using babel-register:

https://www.npmjs.com/package/babel-register

The require hook will bind itself to node's require and automatically compile files on the fly.

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