Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/gatsby/src/utils/gatsby-webpack-stats-extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { PARTIAL_HYDRATION_CHUNK_REASON } from "./webpack/plugins/partial-hydrat
import { store } from "../redux"
import { ensureFileContent } from "./ensure-file-content"

let previousChunkMapJson: string | undefined
let previousWebpackStatsJson: string | undefined

export class GatsbyWebpackStatsExtractor {
private plugin: { name: string }
private publicPath: string
Expand All @@ -14,8 +17,6 @@ export class GatsbyWebpackStatsExtractor {
this.publicPath = publicPath
}
apply(compiler: Compiler): void {
let previousChunkMapJson: string | undefined
let previousWebpackStatsJson: string | undefined
compiler.hooks.done.tapAsync(this.plugin.name, async (stats, done) => {
const assets: { [key: string]: Array<string> } = {}
const assetsMap = {}
Expand Down