https://github.com/staylor/example-react-hot-loader
https://github.com/staylor/example-react-hot-loader
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/staylor/example-react-hot-loader
- Owner: staylor
- Created: 2019-01-20T08:07:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-20T08:18:25.000Z (over 7 years ago)
- Last Synced: 2025-06-10T12:45:12.905Z (about 1 year ago)
- Language: JavaScript
- Size: 90.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example App using React Hot Loader
The documentation for all aspects of `react-hot-loader` and Hot Module Replacement (HMR) across the web is out-of-date, misleading, and confusing. As with any aspect of Node configuration, it only gets more painful as you add features and capabilities to your runtime.
I found no example of a setup that is up-to-date with Babel 7, Webpack 4+, and React 16.7. This example uses the latest versions of Webpack, Babel, React, et al, and the configuration works with SSR in development and production. Configuration files live in the `./webpack` folder.
I have aimed to provide the least amount of configuration possible to support Hot-reloading. That being said, it takes a LOT of configuration to make all of this work.
## Install
```bash
yarn
```
## Development with Hot-reloading of React components
```bash
yarn dev
```
## Production
```bash
yarn prod
```
Your server will run at `http://localhost:3000`.