node-hot-loader
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -0,1 +1,9 @@ | ||
<a name="1.7.0"></a> | ||
## 1.7.0 (2018-04-09) | ||
* Add webpack 4 support ([c3069e4](https://github.com/vlazh/node-hot-loader/commit/c3069e4)) | ||
* Move to webpack 4 ([6a2b35f](https://github.com/vlazh/node-hot-loader/commit/6a2b35f)) | ||
<a name="1.6.2"></a> | ||
@@ -2,0 +10,0 @@ ## <small>1.6.2 (2018-04-08)</small> |
@@ -5,2 +5,3 @@ { | ||
"description": "Example for HMR in a node.js process", | ||
"license": "MIT", | ||
"main": "index.js", | ||
@@ -14,6 +15,6 @@ "scripts": { | ||
"devDependencies": { | ||
"node-hot-loader": "^1.4.0", | ||
"node-hot-loader": "^1.6.2", | ||
"rimraf": "^2.6.2", | ||
"webpack": "^3.8.1" | ||
"webpack": "^4.5.0" | ||
} | ||
} |
@@ -1,11 +0,15 @@ | ||
var path = require("path"); | ||
const path = require('path'); | ||
module.exports = { | ||
entry: { | ||
main: "./index.js" | ||
}, | ||
output: { | ||
path: path.join(__dirname, "out"), | ||
filename: "bundle.js" | ||
}, | ||
target: "node" | ||
entry: { | ||
main: './index.js', | ||
}, | ||
output: { | ||
path: path.join(__dirname, 'out'), | ||
filename: 'bundle.js', | ||
}, | ||
target: 'node', | ||
mode: 'development', | ||
}; |
@@ -230,4 +230,12 @@ 'use strict'; | ||
this.run = () => { | ||
this.context.compiler.plugin('done', this.compilerDone); | ||
this.context.compiler.plugin('compile', this.compilerInvalid); | ||
const { compiler } = this.context; | ||
if (compiler.hooks) { | ||
// webpack >= 4 | ||
compiler.hooks.done.tap('CompilerDone', this.compilerDone); | ||
compiler.hooks.compile.tap('ComplierInvalid', this.compilerInvalid); | ||
} else { | ||
// webpack < 4 | ||
compiler.plugin('done', this.compilerInvalid); | ||
compiler.plugin('compile', this.compilerInvalid); | ||
} | ||
this.startWatch(); | ||
@@ -234,0 +242,0 @@ return this; |
{ | ||
"name": "node-hot-loader", | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"description": "Hot module replacement for Node.js applications", | ||
@@ -61,7 +61,7 @@ "main": "./lib/node-hot.js", | ||
"path-is-absolute": "^1.0.1", | ||
"source-map-support": "^0.5.3", | ||
"source-map-support": "^0.5.4", | ||
"yargs": "^11.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vzh/configs": "^0.54.1", | ||
"@vzh/configs": "^0.66.0", | ||
"babel-cli": "^6.26.0", | ||
@@ -74,9 +74,10 @@ "babel-eslint": "^8.2.2", | ||
"babel-preset-env": "^1.6.1", | ||
"conventional-changelog-cli": "^1.3.14", | ||
"eslint": "^4.18.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"conventional-changelog-cli": "^1.3.21", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-import": "^2.9.0", | ||
"eslint-plugin-import": "^2.10.0", | ||
"eslint-plugin-prettier": "^2.6.0", | ||
"prettier": "^1.10.2", | ||
"prettier": "^1.11.1", | ||
"rimraf": "^2.6.1" | ||
@@ -83,0 +84,0 @@ }, |
40972
507
17
Updatedsource-map-support@^0.5.4