- Webpack v3
- HMR Client side (also for Redux reducers)
- HMR Server side
- React router v4
- Redux for state management
- CSS Modules
- Optional static build
- Long term caching for static assets
- Images optimization (libpngissue fix for OSX user)
- React component creation wizard
- Flexbox grid
- Eslint and Stylelint
This boilerplate uses React Router v4, with server side rendering.
SSR for CSS modules use css-loader/locals
, no extra wrapper function for component is needed.
yarn install
...as usual...
Run website in development mode on localhost:3000
, with Hot Module Replacement Client side and Server side.
yarn run dev
Run build server and client
yarn run build
Run website in production mode on localhost:${process.env.PORT || 3000}
yarn run start
This command runs a static build, that contains plain html files. The navigation will use hash router, instead of browser history.
yarn run build:static
This command launches simple wizard for the creation of a react component.
The component will be created on src/components
.
yarn run component
Type the name of the component: Test
What kind of component do you need? (Use arrow keys)
> functional
stateless
Component succesfully created. Do you need another component? (Y/n)
After deploy, you can run these commands for a complete live environment on localhost:3000
:
yarn install --production
yarn run build
yarn start
https://github.com/claudiocalautti
https://github.com/dwightjack/umeboshi-cli
https://hackernoon.com/hot-reload-all-the-things-ec0fed8ab0