Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Dec 21, 2023
1 parent 4d90068 commit 96b54b0
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/dependency-extraction-webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ class DependencyExtractionWebpackPlugin {
stage: compiler.webpack.Compilation
.PROCESS_ASSETS_STAGE_ANALYSE,
},
() => {
// console.log( 'add' );
this.addAssets( compilation );
// console.log( 'added' );
}
() => this.addAssets( compilation )
);
}
);
Expand Down Expand Up @@ -352,29 +348,23 @@ class DependencyExtractionWebpackPlugin {
chunk.files.add( assetFilename );
}

// console.log( 'x' );

if ( combineAssets ) {
const outputFolder = compilation.outputOptions.path;

// console.log( 'y' );
const assetsFilePath = path.resolve(
outputFolder,
combinedOutputFile ||
'assets.' + ( outputFormat === 'php' ? 'php' : 'json' )
);
// console.log( 'z' );
const assetsFilename = path.relative(
outputFolder,
assetsFilePath
);
// console.log( 'xx' );

// Add source into compilation for webpack to output.
compilation.assets[ assetsFilename ] = new RawSource(
this.stringify( combinedAssetsData )
);
// console.log( 'yy' );
}
}
}
Expand Down

0 comments on commit 96b54b0

Please sign in to comment.