@@ -10,6 +10,7 @@ var Chunk = require("webpack/lib/Chunk");
1010var OrderUndefinedError = require ( "./OrderUndefinedError" ) ;
1111var loaderUtils = require ( "loader-utils" ) ;
1212var validateOptions = require ( 'schema-utils' ) ;
13+ var path = require ( 'path' ) ;
1314
1415var NS = fs . realpathSync ( __dirname ) ;
1516
@@ -124,7 +125,7 @@ function ExtractTextPlugin(options) {
124125 if ( isString ( options ) ) {
125126 options = { filename : options } ;
126127 } else {
127- validateOptions ( './schema/plugin.json' , options , 'Extract Text Plugin' ) ;
128+ validateOptions ( path . resolve ( __dirname , './schema/plugin.json' ) , options , 'Extract Text Plugin' ) ;
128129 }
129130 this . filename = options . filename ;
130131 this . id = options . id != null ? options . id : ++ nextId ;
@@ -203,7 +204,7 @@ ExtractTextPlugin.prototype.extract = function(options) {
203204 if ( Array . isArray ( options ) || isString ( options ) || typeof options . options === "object" || typeof options . query === 'object' ) {
204205 options = { loader : options } ;
205206 } else {
206- validateOptions ( './schema/loader.json' , options , 'Extract Text Plugin (Loader)' ) ;
207+ validateOptions ( path . resolve ( __dirname , './schema/loader.json' ) , options , 'Extract Text Plugin (Loader)' ) ;
207208 }
208209 var loader = options . use || options . loader ;
209210 var before = options . fallback || options . fallbackLoader || [ ] ;
0 commit comments