This is a starter project for webpack with React hot reload
It uses a dev stack with
- webpack module loader as the module bundler
- React Hot Loader to hot reload the file changes
- ReactJS
- Sass for style sheets (CSS with superpowers)
$ git clone <repo URI>
$ npm install
$ npm run watch
Open browser at http://localhost:8090
with watch mode running open src/scripts/subfolder/hello.jsx
in a text editor, modify something and save it.
Tada !!!!
open webpack/webpack.config.js
in text editor and change
entry: [
'./src/scripts/index.js'
],
to
entry: [
'./src/scripts/index-with-styles.js'
],
and restart npm run watch
open src/styles/includes/body.scss
in a text editor, modify the body color and save it.
Tada !!!!
$ npm run build:dev
$ npm run build:prod
the below creates a clean dev and prod build with 2 source maps
$ npm run build