Skip to content

Commit

Permalink
perf: improve perfomance, emit only needed stats (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nio-o authored Nov 22, 2023
1 parent ae1ba14 commit a0024e6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/main/ts/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ export class ModuleFederationManifestPlugin {
const { identifier } = module

if (!identifier) {
// Actually I don't know cases when identifier is not specified
// According to webpack sources all types that we need always have it
// Let's warn about it to obtain information from real cases
// I think all these warnings will be false positive
console.log("WARN: Can't get module.identifier")
console.log('WARN: Please report about it')
console.log('WARN: Provide source code and info below:')
console.log(module)
continue
}

Expand Down Expand Up @@ -155,7 +147,12 @@ export class ModuleFederationManifestPlugin {

private async processWebpackAssets(compilation: webpack.Compilation): Promise<void> {
const liveStats = compilation.getStats()
const stats = liveStats.toJson()
const stats = liveStats.toJson({
all: false,
chunks: true,
publicPath: true,
modules: true,
})

const remoteEntryChunk = this.getRemoteEntryChunk(stats)

Expand Down

0 comments on commit a0024e6

Please sign in to comment.