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
- Install dependencies:
npm install
- Compile client:
npm run compile
- Compile server:
npm run compile-server
- Run production / development environment
- For production:
node server.js
- For development:
npm run dev
- For production:
- Visit: http://localhost:3000
In a live server environment you may only want to install dependencies.
- Install dependencies:
npm install --only=production
Sass is compiled to autoprefixed and minified CSS. Javascript is linted and minified.
Webpack HMR live reloads JavaScript and CSS in the browser.
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.
Licensed under MIT licence.