Skip to content

A minimal boilerplate setup for React, React Hot Loader, Webpack 2 and Express.

License

Notifications You must be signed in to change notification settings

bjonesy/react-hot-webpack-express-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-hot-webpack-express-boilerplate

A minimal boilerplate setup for React, React Hot Loader, Webpack 2 and Express.

Usage

npm install
npm start
open http://localhost:3000

Now edit src/App.js.
Your changes will appear without reloading the browser like in this video.

Linting

This boilerplate project includes React-friendly ESLint configuration.

npm run lint

Building

A basic production script is included that builds your app to a dist folder

npm run build

Using 0.0.0.0 as Host

You may want to change the host in webpack.config.js from localhost to 0.0.0.0 to allow access from same WiFi network. This is not enabled by default because it is reported to cause problems on Windows. This may also be useful if you're using a VM.

Missing Features

This boilerplate is purposefully simple to show the minimal configuration for React Hot Loader. For a real project, you may want to add a router, styles and maybe combine dev server with an existing server. This is out of scope of this boilerplate, but you may want to look into other starter kits.

WebStorm

Because the WebStorm IDE uses "safe writes" by default, Webpack's file-watcher won't recognize file changes, so hot-loading won't work. To fix this, disable "safe write" in WebStorm.

Dependencies

Resources

About

A minimal boilerplate setup for React, React Hot Loader, Webpack 2 and Express.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published