Skip to content

Commit

Permalink
chore: preserve previous webpack stats derived values, even if we res…
Browse files Browse the repository at this point in the history
…tart webpack itself (#36980)
  • Loading branch information
pieh committed Nov 7, 2022
1 parent 2b5af32 commit bc7ac84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/gatsby/src/utils/gatsby-webpack-stats-extractor.ts
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

0 comments on commit bc7ac84

Please sign in to comment.