0.1.6 • Published 9 years ago

react-transform-webpack-hmr v0.1.6

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

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

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago