Skip to content

Webpack to compile JavaScript, JSX and Sass. Incorporates a universal JavaScript build with Express, React, CSS Modules and React Router v4.

Notifications You must be signed in to change notification settings

mauricevancooten/react-starter-kit

Repository files navigation

React Starter Kit

Universal JavaScript build with Express, React v16, Webpack 4 and React Router v4. Makes use of CSS Modules.

Webpack to compile JavaScript, JSX and Sass.

  • ESLint to lint JavaScript
  • Webpack minifies JavaScript
  • JavaScript compiles down to ES5, PostCSS and Autoprefixer compiles CSS for older browser compatibility
  • HMR for development

Instructions

  1. Install dependencies: npm install
  2. Compile client: npm run compile
  3. Compile server: npm run compile-server
  4. Run production / development environment
    • For production: node server.js
    • For development: npm run dev
  5. Visit: http://localhost:3000

In a live server environment you may only want to install dependencies.

  1. Install dependencies: npm install --only=production

Production

Sass is compiled to autoprefixed and minified CSS. Javascript is linted and minified.

Development

Webpack HMR live reloads JavaScript and CSS in the browser.

N.B.

To simplify the starter kit I haven't included an API intergration or meta titles and descriptions.

For extending the starter kit to consume an API see this data example.

To extend the starter kit with meta titles and descriptions, see this meta example.

Licence

Licensed under MIT licence.

About

Webpack to compile JavaScript, JSX and Sass. Incorporates a universal JavaScript build with Express, React, CSS Modules and React Router v4.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published