extract-text-webpack-plugin
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -146,6 +146,5 @@ /* | ||
var chunk = item.chunk; | ||
var file = filename | ||
.replace(Template.REGEXP_NAME, chunk.name || chunk.id) | ||
.replace(Template.REGEXP_HASH, compilation.hash) | ||
.replace(Template.REGEXP_CHUNKHASH, chunk.renderedHash); | ||
var file = compilation.getPath(filename, { | ||
chunk: chunk | ||
}); | ||
assetContents[file] = (assetContents[file] || []).concat(item.content); | ||
@@ -152,0 +151,0 @@ chunk.files.push(file); |
@@ -19,3 +19,11 @@ /* | ||
this.addDependency(this.resourcePath); | ||
if(this[__dirname](null, query)) { | ||
// We already in child compiler, return empty bundle | ||
if(this[__dirname] === undefined) { | ||
throw new Error( | ||
'"extract-text-webpack-plugin" loader is used without the corresponding plugin, ' + | ||
'refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example' | ||
); | ||
} else if(this[__dirname] === false) { | ||
return ""; | ||
} else if(this[__dirname](null, query)) { | ||
if(query.omit) { | ||
@@ -51,2 +59,9 @@ this.loaderIndex += +query.omit + 1; | ||
}); | ||
// We set loaderContext[__dirname] = false to indicate we already in | ||
// a child compiler so we don't spawn another child compilers from there. | ||
childCompiler.plugin("this-compilation", function(compilation) { | ||
compilation.plugin("normal-module-loader", function(loaderContext, module) { | ||
loaderContext[__dirname] = false; | ||
}); | ||
}); | ||
var source; | ||
@@ -103,2 +118,2 @@ childCompiler.plugin("after-compile", function(compilation, callback) { | ||
} | ||
}; | ||
}; |
{ | ||
"name": "extract-text-webpack-plugin", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Extract text from bundle into a file.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18099
22
444