Skip to content

Commit a664d77

Browse files
committed
Fix mini-css-extract-plugin 0.4.3 issue
Resolves shellscape#167 mini-css-extract-plugin reports additional, incorrect information for files that are refenced in CSS. The first time we see the file the `module.userRequest` is correct, and we add to `moduleAssets` correctly. However mini-css-extract-plugin then also reports the same `file` but with `module.userRequest` set to the CSS file that references it, which caused us to overwrite the good value in `moduleAssets`. See the change in mini-css-extract-plugin that caused this webpack-contrib/mini-css-extract-plugin#177
1 parent 5715c07 commit a664d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ManifestPlugin.prototype.apply = function(compiler) {
6060
var outputName = path.relative(outputFolder, outputFile);
6161

6262
var moduleAsset = function (module, file) {
63-
if (module.userRequest) {
63+
if (module.userRequest && !moduleAssets[file]) {
6464
moduleAssets[file] = path.join(
6565
path.dirname(file),
6666
path.basename(module.userRequest)

0 commit comments

Comments
 (0)