webpack-dev-middleware
Advanced tools
Comparing version
@@ -12,3 +12,9 @@ /* | ||
if(!options) options = {}; | ||
if(options.watchDelay === undefined) options.watchDelay = 200; | ||
if(typeof options.watchOptions === "undefined") options.watchOptions = {}; | ||
if(typeof options.watchDelay !== "undefined") { | ||
// TODO remove this in next major version | ||
console.warn("options.watchDelay is deprecated: Use 'options.watchOptions.aggregateTimeout' instead"); | ||
options.watchOptions.aggregateTimeout = options.watchDelay; | ||
} | ||
if(typeof options.watchOptions.aggregateTimeout === "undefined") options.watchOptions.aggregateTimeout = 200; | ||
if(typeof options.stats === "undefined") options.stats = {}; | ||
@@ -98,3 +104,3 @@ if(!options.stats.context) options.stats.context = process.cwd(); | ||
if(!options.lazy) { | ||
var watching = compiler.watch(options.watchDelay, function(err) { | ||
var watching = compiler.watch(options.watchOptions, function(err) { | ||
if(err) throw err; | ||
@@ -101,0 +107,0 @@ }); |
{ | ||
"name": "webpack-dev-middleware", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "Offers a dev middleware for webpack, which arguments a live bundle to a directory", | ||
"peerDependencies": { | ||
"webpack": "1.x" | ||
"webpack": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"enhanced-resolve": "~0.7.5", | ||
"memory-fs": "~0.1.0", | ||
"mime": "1.x" | ||
"memory-fs": "~0.2.0", | ||
"mime": "^1.3.4" | ||
}, | ||
@@ -14,0 +13,0 @@ "licenses": [ |
@@ -50,4 +50,7 @@ # webpack-dev-middleware | ||
watchDelay: 300, | ||
// delay after change (only lazy: false) | ||
watchOptions: { | ||
aggregateTimeout: 300, | ||
poll: true | ||
}, | ||
// watch options (only lazy: false) | ||
@@ -54,0 +57,0 @@ publicPath: "/assets/", |
8283
5.14%3
-25%175
3.55%69
4.55%- Removed
- Removed
- Removed
- Removed
Updated
Updated