erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
12k stars 2.5k forks source link

Why doesn't webpack-dev-server.js use import, let, const? #1254

Closed Pk-T closed 8 years ago

Pk-T commented 8 years ago

I have tried to use es6 features inside config file which is called by webpack-dev-server, but I keep on getting errors as these are not supported? Is there some reason for this? The whole application does use these features.

jpsierens commented 8 years ago

All files on this project that run on node are not using es6 features, only the ones going to the client do. The author isn't using babel for the back end so he can't use 'import', let and const should work if you put 'use strict' and use node v4+

look at https://github.com/babel/example-node-server for an example of how to run es6 features in node.

Pk-T commented 8 years ago

Thanks a lot