@@ -10,6 +10,7 @@ var Chunk = require("webpack/lib/Chunk");
10
10
var OrderUndefinedError = require ( "./OrderUndefinedError" ) ;
11
11
var loaderUtils = require ( "loader-utils" ) ;
12
12
var validateOptions = require ( 'schema-utils' ) ;
13
+ var path = require ( 'path' ) ;
13
14
14
15
var NS = fs . realpathSync ( __dirname ) ;
15
16
@@ -124,7 +125,7 @@ function ExtractTextPlugin(options) {
124
125
if ( isString ( options ) ) {
125
126
options = { filename : options } ;
126
127
} else {
127
- validateOptions ( './schema/plugin.json' , options , 'Extract Text Plugin' ) ;
128
+ validateOptions ( path . resolve ( __dirname , './schema/plugin.json' ) , options , 'Extract Text Plugin' ) ;
128
129
}
129
130
this . filename = options . filename ;
130
131
this . id = options . id != null ? options . id : ++ nextId ;
@@ -203,7 +204,7 @@ ExtractTextPlugin.prototype.extract = function(options) {
203
204
if ( Array . isArray ( options ) || isString ( options ) || typeof options . options === "object" || typeof options . query === 'object' ) {
204
205
options = { loader : options } ;
205
206
} else {
206
- validateOptions ( './schema/loader.json' , options , 'Extract Text Plugin (Loader)' ) ;
207
+ validateOptions ( path . resolve ( __dirname , './schema/loader.json' ) , options , 'Extract Text Plugin (Loader)' ) ;
207
208
}
208
209
var loader = options . use || options . loader ;
209
210
var before = options . fallback || options . fallbackLoader || [ ] ;
0 commit comments