Skip to content

Commit

Permalink
fix: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
piecyk committed Jun 18, 2018
1 parent 1c28304 commit 9975b5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -142,7 +142,7 @@ class MiniCssExtractPlugin {
);
}

module.buildInfo = module.buildInfo || { assets: {} };
module.buildInfo = module.buildInfo || {};
module.buildInfo.assets = {
...module.buildInfo.assets,
...assets,
Expand Down
4 changes: 2 additions & 2 deletions src/loader.js
Expand Up @@ -78,7 +78,7 @@ export function pitch(request) {
);

let source;
let assets = {};
const assets = {};
childCompiler.hooks.afterCompile.tap(pluginName, (compilation) => {
source =
compilation.assets[childFilename] &&
Expand All @@ -87,7 +87,7 @@ export function pitch(request) {
// Collect assets from modules
compilation.modules.forEach((module) => {
if (module.buildInfo && module.buildInfo.assets) {
assets = { ...assets, ...module.buildInfo.assets };
Object.assign(assets, module.buildInfo.assets);
}
});

Expand Down

0 comments on commit 9975b5e

Please sign in to comment.