File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ module.exports = function(compiler, options) {
111
111
localPrefix = "/" + localPrefix . replace ( / ^ h t t p s ? : \/ \/ [ ^ \/ ] + \/ / , "" ) ;
112
112
}
113
113
// fast exit if another directory requested
114
- if ( url . indexOf ( localPrefix ) != 0 ) return next ( ) ;
114
+ if ( url . indexOf ( localPrefix ) != 0 ) return false ;
115
115
// get filename from request
116
116
var filename = url . substr ( localPrefix . length ) ;
117
117
return pathJoin ( compiler . outputPath , filename ) ;
@@ -120,6 +120,8 @@ module.exports = function(compiler, options) {
120
120
// The middleware function
121
121
function webpackDevMiddleware ( req , res , next ) {
122
122
var filename = getFilenameFromUrl ( req . url ) ;
123
+ if ( filename === false ) return next ( ) ;
124
+
123
125
// in lazy mode, rebuild on bundle request
124
126
if ( options . lazy && filename === pathJoin ( compiler . outputPath , options . filename ) )
125
127
rebuild ( ) ;
@@ -154,4 +156,4 @@ module.exports = function(compiler, options) {
154
156
webpackDevMiddleware . fileSystem = fs ;
155
157
156
158
return webpackDevMiddleware ;
157
- }
159
+ }
You can’t perform that action at this time.
0 commit comments