catamphetamine / universal-webpack

Isomorphic Webpack: both on client and server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readme.md commands do not work

davibe opened this issue · comments

In all of your command examples i.e.
webpack-dev-server --hot --inline --config "./webpack.config.client.js" --port XXXX --colors --display-error-details

you should postpone babel-node otherwise node.js does not support import ES6 stuff. Unless i am missing something ?

I don't understand what you're saying

it's a noob observation. Instead of writing webpack-dev-server --hot --inline --config "./webpack.config.client.js" --port XXXX --colors --display-error-details -> you could write -> babel-node webpack-dev-server --hot --inline --config "./webpack.config.client.js" --port XXXX --colors --display-error-details otherwise the syntax propsed for webpack.config.* would trigger import errors (import .. from ..)

Oh, I see.
Well, this example is meant for ES5 syntax for simplicity sake.
For ES6 there are 3 options:

  • using babel-node
  • using webpack.config.client.babel.js magic filename
  • using require('babel-register'); require('es6.config') in the config

I wouldn't enforce any of them

Looks like i did not know about the magic filename thing!