File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 5
5
var MemoryFileSystem = require ( "memory-fs" ) ;
6
6
var mime = require ( "mime" ) ;
7
7
var parseRange = require ( "range-parser" ) ;
8
+ var path = require ( "path" ) ;
8
9
var getFilenameFromUrl = require ( "./lib/GetFilenameFromUrl" ) ;
9
10
var pathJoin = require ( "./lib/PathJoin" ) ;
10
11
@@ -55,7 +56,7 @@ module.exports = function(compiler, options) {
55
56
if ( typeof options . reporter !== "function" ) options . reporter = defaultReporter ;
56
57
if ( typeof options . log !== "function" ) options . log = console . log . bind ( console ) ;
57
58
if ( typeof options . warn !== "function" ) options . warn = console . warn . bind ( console ) ;
58
- if ( typeof compiler . outputPath === "string" && compiler . outputPath . lastIndexOf ( "/" , 0 ) !== 0 ) {
59
+ if ( typeof compiler . outputPath === "string" && ! path . isAbsolute ( compiler . outputPath ) ) {
59
60
throw new Error ( "`output.path` needs to be an absolute path or `/`." ) ;
60
61
}
61
62
You can’t perform that action at this time.
0 commit comments