Skip to content

Commit

Permalink
fix: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
piecyk committed Sep 12, 2018
1 parent 8e97331 commit 23ea2cb
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 @@ -147,7 +147,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 @@ -76,7 +76,7 @@ export function pitch(request) {
);

let source;
let assets = {};
const assets = {};
childCompiler.hooks.afterCompile.tap(pluginName, (compilation) => {
source =
compilation.assets[childFilename] &&
Expand All @@ -85,7 +85,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 23ea2cb

Please sign in to comment.