This repo is a very minimal react hot loader example / starter kit that was based on this other repo: https://github.com/patrikholcak/hot-loader-demo I just made it simpler, removed redux, router and the rest of the stuff as I needed a bare-bone set-up to base a npm package on (so redux is not usefu for me here) and thought to make it available to everyone (including my future-self!) Have fun!
The goal of this repository is to provide a minimal, out-of-the-box working starter kit. I realised that I often find myself spending time on deleting most of the features from other people’s starter kits and implementing them myself. Not necessarily because the implementation is wrong, but because I don’t understand how it works and I want to gain a better understanding of it. So this repository is the barest minimum so you can add, rather than delete.
- No support is provided.
- If you don’t know how to use this, don’t.
- Do not use in production — some libraries are still in beta or even alpha.
- Node 6 or later
- React
- Redux & React Redux
- React Router 4
- Redux-controlled router
- React Hot Reload 3
- Webpack 2
This project uses as little transpilation as possible as it fits my use-case (Electron app). The only “heavier” use of transpilation is there only to fix UglifyJS. Should you have any problems with Babel, there will not be any support unless it’s also affecting the functionality of this kit.
As pointed here, using with babel-preset-es2015
requires some additional configuration. You can either:
1. Use Babel module transpiling — in that case, you will need to re-require the app module on module.hot.accept
. Edit ./src/main.js
as follows:
module.hot.accept('./app', () => {
const NextApp = require('./app').default;
renderApp(NextApp);
});
{
"presets": ["es2015", { "modules": false }]
}
I didn’t want to provide (or force) the use of a particular css preprocessor or workflow so only style-loader
and css-loader
are provided. If you are looking for a good css compiler, check out PostCSS.
MIT