christianalfoni / webpack-express-boilerplate

A boilerplate for running a Webpack workflow in Node express
MIT License
1.4k stars 292 forks source link

Server side code doesn't support ES6 syntax #57

Open tanaypratap opened 7 years ago

tanaypratap commented 7 years ago

The server.js file is plain old JS and doesn't support ES6 code while this is needed for writing code in current JS standards. I need this very much because I want to server side rendering and to run react on server side we would need JSX and other compilers working for server.js as well. Can we configure webpack to use es6 loaders for server side code as well?

rmariuzzo commented 7 years ago

I'm facing the same issue right now... :'(

kbariotis commented 7 years ago

Indeed the Readme says

Babel and Linting Both Node server and frontend code runs with Babel. And all ...

But the server doesn't seem to be transpiled as well. Maybe the author (@christianalfoni) changed the direction of the project at some point.

I would love to give it a try and setup server side transpilation again.