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
buildbut sets webpack'soutput.publicPathto a relative path to enable testing on localhost
- Same as
build:vis- Same as
buildbut enables webpack-bundle-analyzer to analyze bundle module size
- Same as
build:local:vis- Same as
build:localbut 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:buildbut 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:startbut 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-sasswhere bindings may not be found for the current environment- Known fix - Uninstall and reinstall
node-sassnpm uninstall -D node-sass npm install -D node-sass
- Known fix - Uninstall and reinstall