react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

Production #295

Closed janmraz closed 7 years ago

janmraz commented 7 years ago

Hi, I wanna ask if you have prepared solution for production.For example delete hot reloading or create webpack build and so on..

Thanks for answer

sthzg commented 7 years ago

Hi @JohnyFreeze, if you run npm run dist the buid will be optimized for production. This includes invoking webpack with the -p option, building the app with NODE_ENV production, leaving out hot module replacement, and making use of some further Webpack plugins.

You can take a look at cfg/Dist.js to see the Webpack config that is used for npm run dist.