Skip to content

Commit

Permalink
Implement livereactload for hot loading
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemorton committed Feb 14, 2016
1 parent 97609b6 commit 96c73ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"babel-cli": "^6.4.5",
"babel-plugin-react-transform": "^2.0.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babelify": "^7.2.0",
Expand All @@ -47,7 +48,9 @@
"eslint-config-standard-react": "^1.2.1",
"eslint-plugin-react": "^3.15.0",
"eslint-plugin-standard": "^1.3.1",
"livereactload": "^2.1.1",
"morgan": "^1.6.1",
"react-proxy": "^1.1.2",
"watchify": "^3.7.0"
},
"eslintConfig": {
Expand Down Expand Up @@ -76,6 +79,18 @@
"presets": [
"es2015",
"react"
]
],
"env": {
"development": {
"plugins": [
["react-transform", {
"transforms": [{
"transform": "livereactload/babel-transform",
"imports": ["react"]
}]
}]
]
}
}
}
}
3 changes: 2 additions & 1 deletion src/application.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import browserify from 'browserify';
import watchify from 'watchify';
import livereactload from 'livereactload';
import fs from 'fs';
import path from 'path';

Expand Down Expand Up @@ -103,7 +104,7 @@ export function watchClient({ config, onBuildFinish }) {
const entries = buildClientEntryPoint(config);
const cache = {};
const packageCache = {};
const plugin = [watchify];
const plugin = [watchify, livereactload];

ensureTmpPathExists(config);

Expand Down

0 comments on commit 96c73ef

Please sign in to comment.