WebpackDevMiddlewareOptions Es6 webpack #713

Closed
opened 2025-08-09 17:17:23 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @MartinDawson on 5/28/2017

Error: Unexpected token 'import' in webpack.config.babel.js

I want to use ES6 syntax in webpack.
The webpack middleware doesn't seem to be requiring babel-register to make webpack work with ES6.

It works if just run webpack-dev-server normally.

Can this be looked in to?

If I could require babel-register somehow then it should work. E.G

node -r babel-register node_modules/.bin/webpack -p --config=webpack.config.babel.js

*Originally created by @MartinDawson on 5/28/2017* Error: Unexpected token 'import' in webpack.config.babel.js I want to use ES6 syntax in webpack. The webpack middleware doesn't seem to be requiring babel-register to make webpack work with ES6. It works if just run webpack-dev-server normally. Can this be looked in to? If I could require babel-register somehow then it should work. E.G node -r babel-register node_modules/.bin/webpack -p --config=webpack.config.babel.js
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#713
No description provided.