Skip to content

Commit

Permalink
Fix mini-css-extract-plugin 0.4.3 issue
Browse files Browse the repository at this point in the history
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
  • Loading branch information
karlvr committed Nov 13, 2018
1 parent bcca890 commit de5f138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin.js
Expand Up @@ -40,7 +40,7 @@ ManifestPlugin.prototype.apply = function(compiler) {
var outputName = path.relative(outputFolder, outputFile);

var moduleAsset = function (module, file) {
if (module.userRequest) {
if (module.userRequest && !moduleAssets[file]) {
moduleAssets[file] = path.join(
path.dirname(file),
path.basename(module.userRequest)
Expand Down

0 comments on commit de5f138

Please sign in to comment.