High customizable production-ready React environment with live-editing. Live editing (webpack-dev-server and react-hot-loader) are included only when running in dev-server mode.
npm i
npm run dev-server
open http://localhost:8081
edit src/components/app.js
All the changes will appear without reloading the browser. build.js automatically adds hot-module to all entry points when running in dev-server mode.
npm run build
bundle files will appear in ./public/assets/
This boilerplate includes React-friendly ESLint configuration with Airbnb style guideline. Eslint runs automatically on each build.
npm --silent run profiler > profile
upload file to http://webpack.github.io/analyse/
You can change build configuration in build.js
WEBPACK_ENTRYwebpack entry pointPUBLIC_PATHpublic path for assetsCONTENT_BASEcontent baseSOURCE_PATHsources pathOUTPUT_JSoutput js nameOUTPUT_CSSoutput css nameOUTPUT_FONTSoutput fonts nameOUTPUT_MEDIAoutput media nameEXTRACT_CSSif true, css will be extracted intoOUTPUT_CSS. if false - included intoOUTPUT_JS
For example you want to change fonts public path from /assets/ to /assets/fonts/:
mkdir ./public/assets/fonts/
change OUTPUT_FONTS to ./fonts/[hash].[ext]
To enable proxying requests (api, backend, etc) in dev-server mode you can change DEV_SERVER_PROXY_PORT and DEV_SERVER_PROXY_HOST in build.js.
You may want to change the host DEV_SERVER_HOST in build.js from localhost to 0.0.0.0 to allow access from same WiFi network.