0.0.1 • Published 2 years ago

build-plugin-sto-react-hmr v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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-dom

Usage

  • Import react-hot-loader in 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",
  ]

效果

Image text