MCPcopy Index your code
hub / github.com/electron/forge / writeJSONStats

Method writeJSONStats

packages/plugin/webpack/src/WebpackPlugin.ts:125–140  ·  view source on GitHub ↗
(
    type: string,
    stats: webpack.Stats | undefined,
    statsOptions: WebpackToJsonOptions,
    suffix: string,
  )

Source from the content-addressed store, hash-verified

123 };
124
125 async writeJSONStats(
126 type: string,
127 stats: webpack.Stats | undefined,
128 statsOptions: WebpackToJsonOptions,
129 suffix: string,
130 ): Promise<void> {
131 if (!stats) return;
132 d(`Writing JSON stats for ${type} config`);
133 const jsonStats = stats.toJson(statsOptions);
134 const jsonStatsFilename = path.resolve(
135 this.baseDir,
136 type,
137 `stats-${suffix}.json`,
138 );
139 await fs.writeJson(jsonStatsFilename, jsonStats, { spaces: 2 });
140 }
141
142 private runWebpack = async (
143 options: Configuration[],

Callers 2

WebpackPluginClass · 0.95
cbMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected