catamphetamine / universal-webpack

Isomorphic Webpack: both on client and server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-dev-server does not support es6 modules

AndrewRayCode opened this issue · comments

webpack-dev-server --hot --config ./webpack.config.client.dev.babel.js
test/webpack.config.client.dev.babel.js:1
(function (exports, require, module, __filename, __dirname) { import webpack from 'webpack';
                                                                     ^^^^^^^

SyntaxError: Unexpected identifier

Maybe you should install @babel/register as stated here:
https://stackoverflow.com/questions/47820724/cannot-read-property-helpers-of-undefined-with-babel-and-webapck/48235563#48235563

I've had same problem when I'm adding universal-webpack in my project and I fixed this way.