Boilerplate for React app
- Clone repository
git clone https://github.com/cmccormack/react-boilerplate.git
- Enter repository directory
cd react-boilerplate
- Install dependencies
npm install
- Test success by running in development server
npm run dev:start
- A new browser tab should open
http://localhost:9000/
- A success message should be displayed in the browser tab
- A new browser tab should open
build
- Outputs bundle and assets to "/dist" directory in "production" mode
build:local
- Same as
build
but sets webpack'soutput.publicPath
to a relative path to enable testing on localhost
- Same as
build:vis
- Same as
build
but enables webpack-bundle-analyzer to analyze bundle module size
- Same as
build:local:vis
- Same as
build:local
but enables webpack-bundle-analyzer to analyze bundle module size
- Same as
dev:build
- Outputs bundle and assets to "/dist" directory in "development" mode
dev:build:vis
- Same as
dev:build
but enables webpack-bundle-analyzer to analyze bundle module size
- Same as
dev:start
- Starts a development server that performs live reload when a file is saved
dev:start:vis
- Same as
dev:start
but enables webpack-bundle-analyzer to analyze bundle module size
- Same as
setup
- Runs setup ** Currently in development **
- On Windows, there may be an issue with
node-sass
where bindings may not be found for the current environment- Known fix - Uninstall and reinstall
node-sass
npm uninstall -D node-sass npm install -D node-sass
- Known fix - Uninstall and reinstall