christianalfoni / webpack-express-boilerplate

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

running node server in production #14

Closed doroncy closed 8 years ago

doroncy commented 8 years ago

the current configuration doesn't bundle the nodejs server side code, therefore in order to run the production bundled code you need to run it via babel-node, which is not production ready due to the heavy runtime compiling. please advice what should be done in order to have this project ready for production? i saw solutions that created two webpack configuration for frontend and backend and using gulp building both projects, any other ideas?

jabhishek commented 8 years ago

Hi @doroncy, I had the same concerns and I ended up changing my bolierplate to use plain old node code, and not relying on babel to create a bundle. Having said that, I am on node 4.1, which has pretty decent es6 support (details here)

christianalfoni commented 8 years ago

Hi guys, and sorry for late reply.

I did a test on this and I am planning to update the boilerplate. In the meantime, take a look at this: http://jlongster.com/Backend-Apps-with-Webpack--Part-I

sohibul commented 8 years ago

also waiting for server side