Unverified Commit 45928cee authored by Mark Knichel's avatar Mark Knichel Committed by GitHub

Fix a bug in the webpack-sources patch that happens sometimes when using the webpack cache (#67928)

parent c175c24d
...@@ -188,7 +188,7 @@ export async function webpackBuildImpl( ...@@ -188,7 +188,7 @@ export async function webpackBuildImpl(
await runWebpackSpan.traceAsyncFn(async () => { await runWebpackSpan.traceAsyncFn(async () => {
if (config.experimental.webpackMemoryOptimizations) { if (config.experimental.webpackMemoryOptimizations) {
stringBufferUtils.disableDualStringBufferCaching() stringBufferUtils.disableDualStringBufferCaching()
stringBufferUtils.enableStringInterning() stringBufferUtils.enterStringInterningRange()
} }
// Run the server compilers first and then the client // Run the server compilers first and then the client
...@@ -261,7 +261,7 @@ export async function webpackBuildImpl( ...@@ -261,7 +261,7 @@ export async function webpackBuildImpl(
} }
if (config.experimental.webpackMemoryOptimizations) { if (config.experimental.webpackMemoryOptimizations) {
stringBufferUtils.disableStringInterning() stringBufferUtils.exitStringInterningRange()
} }
inputFileSystem?.purge?.() inputFileSystem?.purge?.()
......
...@@ -453,9 +453,9 @@ declare module 'next/dist/compiled/loader-utils3' ...@@ -453,9 +453,9 @@ declare module 'next/dist/compiled/loader-utils3'
declare module 'next/dist/compiled/webpack-sources3' { declare module 'next/dist/compiled/webpack-sources3' {
interface StringBufferUtils { interface StringBufferUtils {
disableDualStringBufferCaching: () => boolean disableDualStringBufferCaching: () => boolean
disableStringInterning: () => boolean
enableDualStringBufferCaching: () => boolean enableDualStringBufferCaching: () => boolean
enableStringInterning: () => boolean enterStringInterningRange: () => boolean
exitStringInterningRange: () => boolean
} }
export let stringBufferUtils: StringBufferUtils export let stringBufferUtils: StringBufferUtils
} }
......
This diff is collapsed.
...@@ -22,7 +22,7 @@ overrides: ...@@ -22,7 +22,7 @@ overrides:
patchedDependencies: patchedDependencies:
webpack-sources@3.2.3: webpack-sources@3.2.3:
hash: exarmjd4pnde4auoeobjrmju54 hash: jbynf5dc46ambamq3wuyho6hkq
path: patches/webpack-sources@3.2.3.patch path: patches/webpack-sources@3.2.3.patch
importers: importers:
...@@ -1471,7 +1471,7 @@ importers: ...@@ -1471,7 +1471,7 @@ importers:
version: webpack-sources@1.4.3 version: webpack-sources@1.4.3
webpack-sources3: webpack-sources3:
specifier: npm:webpack-sources@3.2.3 specifier: npm:webpack-sources@3.2.3
version: webpack-sources@3.2.3(patch_hash=exarmjd4pnde4auoeobjrmju54) version: webpack-sources@3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq)
ws: ws:
specifier: 8.2.3 specifier: 8.2.3
version: 8.2.3 version: 8.2.3
...@@ -31425,7 +31425,7 @@ snapshots: ...@@ -31425,7 +31425,7 @@ snapshots:
source-list-map: 2.0.1 source-list-map: 2.0.1
source-map: 0.6.1 source-map: 0.6.1
webpack-sources@3.2.3(patch_hash=exarmjd4pnde4auoeobjrmju54): {} webpack-sources@3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq): {}
webpack-stats-plugin@1.1.0: {} webpack-stats-plugin@1.1.0: {}
...@@ -31454,7 +31454,7 @@ snapshots: ...@@ -31454,7 +31454,7 @@ snapshots:
tapable: 2.2.0 tapable: 2.2.0
terser-webpack-plugin: 5.3.10(@swc/core@1.6.13(@swc/helpers@0.5.12))(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12))) terser-webpack-plugin: 5.3.10(@swc/core@1.6.13(@swc/helpers@0.5.12))(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12)))
watchpack: 2.4.0 watchpack: 2.4.0
webpack-sources: 3.2.3(patch_hash=exarmjd4pnde4auoeobjrmju54) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq)
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/core' - '@swc/core'
- esbuild - esbuild
...@@ -31485,7 +31485,7 @@ snapshots: ...@@ -31485,7 +31485,7 @@ snapshots:
tapable: 2.2.0 tapable: 2.2.0
terser-webpack-plugin: 5.3.10(@swc/core@1.7.0-nightly-20240714.1(@swc/helpers@0.5.12))(webpack@5.90.0(@swc/core@1.7.0-nightly-20240714.1(@swc/helpers@0.5.12))) terser-webpack-plugin: 5.3.10(@swc/core@1.7.0-nightly-20240714.1(@swc/helpers@0.5.12))(webpack@5.90.0(@swc/core@1.7.0-nightly-20240714.1(@swc/helpers@0.5.12)))
watchpack: 2.4.0 watchpack: 2.4.0
webpack-sources: 3.2.3(patch_hash=exarmjd4pnde4auoeobjrmju54) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq)
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/core' - '@swc/core'
- esbuild - esbuild
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment