build-plugin-sto-react-hmr

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i build-plugin-sto-react-hmr

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

4.45 kB

Total Files

4

Last publish

Collaborators

  • fuzan
  • zhangfujin