Socket
Socket
Sign inDemoInstall

webpack-dev-middleware

Package Overview
Dependencies
278
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.5.0

20

middleware.js

@@ -5,6 +5,7 @@ /*

*/
var path = require("path");
var MemoryFileSystem = require("memory-fs");
var mime = require("mime");
var HASH_REGEXP = /[0-9a-f]{10,}/;
// constructor for the middleware

@@ -153,4 +154,13 @@ module.exports = function(compiler, options) {

if(HASH_REGEXP.test(filename)) {
try {
if(fs.statSync(filename).isFile()) {
processRequest();
return;
}
} catch(e) {}
}
// delay the request until we have a vaild bundle
ready(function() {
ready(processRequest, req);
function processRequest() {
try {

@@ -160,3 +170,3 @@ var stat = fs.statSync(filename);

if (stat.isDirectory()) {
filename = path.join(filename, "index.html");
filename = pathJoin(filename, "index.html");
stat = fs.statSync(filename);

@@ -182,4 +192,4 @@ if(!stat.isFile()) throw "next";

}
res.end(content);
}, req);
res.send(content);
}
}

@@ -186,0 +196,0 @@

{
"name": "webpack-dev-middleware",
"version": "1.4.0",
"version": "1.5.0",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Offers a dev middleware for webpack, which arguments a live bundle to a directory",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc