Skip to content

DimitryDushkin/webpack2-react-hmr-ssr-express-stylus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tech

  • Webpack 2
  • Express 4 + webpack dev server hot reload
  • React 15.4 (+ some babel optimizations including transform-runtime)
  • React hot module reload (including server-side thanks to decache in dev mode)
  • Server-side rendering (thanks to babel-register)
  • webpack manifest for production builds hashing
  • Stylus + autoprefixer

Webpack in webpack.config.js uses separate babel config with disabled modules, so webpack can handle natively all import, exports to enable Tree Shaking for minimal bundle size.

Also there is no need to write import React from 'react' in every *.jsx file thanks to babel's react-require plugin.

How

For production build (node start slow first time to compile JSX):

yarn
npm run build
NODE_ENV=production node src/server/server.js

For development (HMR and staff):

npm run dev

About

webpack 2, react, express, HMR, SSR, stylus boilerplate

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published