Socket
Socket
Sign inDemoInstall

webpack-dev-middleware

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-dev-middleware - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

19

middleware.js

@@ -15,2 +15,10 @@ /*

if(!options.stats.context) options.stats.context = process.cwd();
if(options.lazy) {
if(typeof options.filename === "string") {
var str = options.filename
.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")
.replace(/\\\[[a-z]+\\\]/ig, ".+");
options.filename = new RegExp("^" + str + "$");
}
}

@@ -63,4 +71,9 @@ // store our files in memory

}
function invalidAsyncPlugin(compiler, callback) {
invalidPlugin();
callback();
}
compiler.plugin("invalid", invalidPlugin);
compiler.plugin("compile", invalidPlugin);
compiler.plugin("watch-run", invalidAsyncPlugin);
compiler.plugin("run", invalidAsyncPlugin);

@@ -132,4 +145,5 @@ // the state, false: bundle invalid, true: bundle valid

// in lazy mode, rebuild on bundle request
if(options.lazy && filename === pathJoin(compiler.outputPath, options.filename))
if(options.lazy && (!options.filename || options.filename.test(filename)))
rebuild();
// delay the request until we have a vaild bundle

@@ -156,2 +170,3 @@ ready(function() {

res.setHeader("Content-Type", mime.lookup(filename));
res.setHeader("Content-Length", content.length);
if(options.headers) {

@@ -158,0 +173,0 @@ for(var name in options.headers) {

54

package.json
{
"name": "webpack-dev-middleware",
"version": "1.0.11",
"author": "Tobias Koppers @sokra",
"description": "Offers a dev middleware for webpack, which arguments a live bundle to a directory",
"peerDependencies": {
"webpack": "1.x"
},
"dependencies": {
"enhanced-resolve": "~0.7.5",
"memory-fs": "~0.1.0",
"mime": "1.x"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"engines": {
"node": ">=0.6"
},
"homepage": "http://github.com/webpack/webpack-dev-middleware",
"main": "middleware.js",
"repository": {
"type": "git",
"url" : "https://github.com/webpack/webpack-dev-middleware.git"
}
"name": "webpack-dev-middleware",
"version": "1.1.0",
"author": "Tobias Koppers @sokra",
"description": "Offers a dev middleware for webpack, which arguments a live bundle to a directory",
"peerDependencies": {
"webpack": "1.x"
},
"dependencies": {
"enhanced-resolve": "~0.7.5",
"memory-fs": "~0.1.0",
"mime": "1.x"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"engines": {
"node": ">=0.6"
},
"homepage": "http://github.com/webpack/webpack-dev-middleware",
"main": "middleware.js",
"repository": {
"type": "git",
"url": "https://github.com/webpack/webpack-dev-middleware.git"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc