Skip to content

Commit

Permalink
[patch] resolve react/lib/ReactMount issue for hot reload (#679)
Browse files Browse the repository at this point in the history
* resolve react/lib/ReactMount issue for hot reload

* resolve react/lib/ReactMount issue for hot reload

* fix linter issue
  • Loading branch information
didi0613 authored and jchip committed Jan 15, 2018
1 parent d234937 commit d73327f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"react"
],
"plugins": [
"react-hot-loader/babel",
"transform-es2015-template-literals",
"transform-es2015-literals",
"transform-es2015-function-name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ const _ = require("lodash");
const logger = require("electrode-archetype-react-app/lib/logger");

module.exports = function(options) {
if (options.HotModuleReload) {
require("react-hot-loader/patch");
}

const clientVendor = Path.join(AppMode.src.client, "vendor/");
const babelExclude = x => {
if (x.indexOf("/node_modules") >= 0) return true;
Expand All @@ -19,7 +23,6 @@ module.exports = function(options) {
test: /\.jsx?$/,
exclude: babelExclude,
use: [
options.HotModuleReload && "react-hot-loader",
{
loader: "babel-loader",
options: options.babel
Expand Down
2 changes: 1 addition & 1 deletion packages/electrode-archetype-react-app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"postcss-loader": "^0.11.1",
"prop-types": "^15.5.6",
"raw-loader": "^0.5.1",
"react-hot-loader": "^1.2.8",
"react-hot-loader": "^3.1.3",
"react-intl": "^2.1.0",
"react-test-renderer": "^16.1.1",
"require-at": "^1.0.0",
Expand Down

0 comments on commit d73327f

Please sign in to comment.