From 1007807a59bbb86aed5c1c978c2048481d1a5636 Mon Sep 17 00:00:00 2001 From: David Zukowski Date: Fri, 4 Sep 2015 20:35:16 -0400 Subject: [PATCH] updates universal example to use react-transform-webpack-hmr in place of react-hot-loader --- examples/universal/.babelrc | 12 +++++++++++- examples/universal/package.json | 3 ++- examples/universal/webpack.config.js | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/universal/.babelrc b/examples/universal/.babelrc index cab5d10d92..86df1d6833 100644 --- a/examples/universal/.babelrc +++ b/examples/universal/.babelrc @@ -1,3 +1,13 @@ { - "stage": 2 + "stage": 2, + "plugins" : [ + "react-transform" + ], + "extra" : { + "react-transform": [{ + "target" : "react-transform-webpack-hmr", + "imports" : ["react"], + "locals" : ["module"] + }] + } } diff --git a/examples/universal/package.json b/examples/universal/package.json index ec73314836..62cbf39612 100644 --- a/examples/universal/package.json +++ b/examples/universal/package.json @@ -29,8 +29,9 @@ "devDependencies": { "babel-core": "^5.8.22", "babel-loader": "^5.3.2", + "babel-plugin-react-transform": "^1.0.3", "babel-runtime": "^5.8.20", - "react-hot-loader": "^1.3.0", + "react-transform-webpack-hmr": "^0.1.4", "webpack": "^1.11.0", "webpack-dev-server": "^1.10.1" } diff --git a/examples/universal/webpack.config.js b/examples/universal/webpack.config.js index 07e7ba4b70..9f4ee0396d 100644 --- a/examples/universal/webpack.config.js +++ b/examples/universal/webpack.config.js @@ -22,7 +22,7 @@ module.exports = { module: { loaders: [{ test: /\.js$/, - loaders: ['react-hot', 'babel?optional=runtime'], + loaders: ['babel?optional=runtime'], exclude: /node_modules/, include: __dirname }]