0.0.1 • Published 3 years ago
build-plugin-sto-react-hmr v0.0.1
Build Plugin Sto React Hmr
build hot module replace for react project
Getting Started
installation
Add via npm
$ npm install build-plugin-sto-react-hmr --save-dev
$ npm install react-hot-loader @hot-loader/react-domUsage
- Import 
react-hot-loaderin your entry file (before import React) 
import 'react-hot-loader';- Mark your root component as hot-exported
 
// App.js
import { hot } from 'react-hot-loader/root';
const App = () => <div>Hello World!</div>;
export default hot(App);- edit build.json file
 
 "plugins": [
    ....
    "build-plugin-sto-react-hmr",
  ]效果
