This package has been deprecated

Author message:

react-transform-webpack-hmr has been renamed to react-transform-hmr. Please update the package name in package.json and your Babel configuration.

react-transform-webpack-hmr

0.1.6 • Public • Published

react-transform-webpack-hmr

A React Transform equivalent to React Hot Loader.

Installation

First, install the Babel plugin:

npm install --save-dev babel-plugin-react-transform

Then, install the transform:

npm install --save-dev react-transform-webpack-hmr

Then edit your .babelrc to include extra.babel-plugin-react-transform.
It must be an array of the transforms you want to use:

{
  "stage": 0,
  "plugins": [
    "react-transform"
  ],
  "extra": {
    // must be defined and be an array
    "react-transform": [{
      "target": "react-transform-webpack-hmr",
      // if you use React Native, pass "react-native" instead:
      "imports": ["react"],
      // this is important for Webpack HMR:
      "locals": ["module"]
    }]
    // note: you can put more transforms into array
    // this is just one of them!
  }
}

Finally, make sure you process files with babel-loader, and that you don’t use React Hot Loader (it’s not needed with this transform).

This transform has no effect when process.env.NODE_ENV is set to 'production'.

License

MIT

Package Sidebar

Install

npm i react-transform-webpack-hmr

Weekly Downloads

3

Version

0.1.6

License

MIT

Last publish

Collaborators

  • gaearon