Skip to content

Starter template for React with webpack. Doesn't focus on simplicity! NOT FOR BEGINNERS!

Notifications You must be signed in to change notification settings

CalebMorris/react-starter

 
 

Repository files navigation

React Starter

Starter template for react and webpack with Reflux

Local Installation

  1. Install node.js
  2. `git clone -o starter [email protected]:CalebMorris/react-starter.git
  3. npm install

Development server

  1. npm run dev-server Start webpack-dev-derver
  2. npm run start-dev Run seperate console
  3. Visit http://localhost:8080/ in browser

Info

The configuration is webpack-dev-server.config.js.

It automatically recompiles and refreshes the page when files are changed.

Also check the webpack-dev-server documentation.

Hot Module Replacement development server

  1. npm run hot-dev-server Start webpack-dev-derver in HMR mode
  2. npm run start-dev Run seperate console
  3. Visit http://localhost:8080/ in browser

Info

The configuration is webpack-hot-dev-server.config.js.

It automatically recompiles when files are changed. When a hot-replacement-enabled file is changed (i. e. stylesheets or React components) the module is hot-replaced. If Hot Replacement is not possible the page is refreshed.

Hot Module Replacement has a performance impact on compilation.

Production compilation and server

  1. npm run build bundle client
  2. npm run start start server in production mode
  3. Visit http://localhost:8080/ in browser

Info

The configuration is webpack-production.config.js.

The server is at lib/server.js

The production setting builds two configurations: one for the client (build/public) and one for the serverside prerendering (build/prerender).

About

Starter template for React with webpack. Doesn't focus on simplicity! NOT FOR BEGINNERS!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.3%
  • HTML 1.7%