Skip to content

Commit ab39854

Browse files
committed
address feedback
1 parent 25ead27 commit ab39854

File tree

11 files changed

+125
-239
lines changed

11 files changed

+125
-239
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ test/**/next-env.d.ts
3535
test/tmp/**
3636
test/.trace
3737
test/traces
38+
test/development/slow-module-detection/pages/slowModule.js
3839

3940
# Editors
4041
**/.idea

packages/next/errors.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -627,11 +627,8 @@
627627
"626": "Intercepting routes are not supported with static export.\\nRead more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features",
628628
"627": "cacheLife() is only available with the experimental.useCache config.",
629629
"628": "cacheTag() is only available with the experimental.useCache config.",
630-
"629": "[SlowModuleDetectionPlugin] Cannot record additional build times: The analysis has already been finalized.",
631-
"630": "[SlowModuleDetectionPlugin] Cannot regenerate dependency graph: The graph has already been generated.",
632-
"631": "[SlowModuleDetectionPlugin] Circular dependency detected in module graph.",
633-
"632": "[SlowModuleDetectionPlugin] Cannot generate performance report: The module analysis has not been finalized.",
634-
"633": "Unable to identify module: The module is missing a required debugId. This may indicate a problem with webpack's internal module tracking.",
635-
"634": "[SlowModuleDetectionPlugin] Module analyzer initialization error: The analyzer was not properly initialized.",
636-
"635": "[SlowModuleDetectionPlugin] Module build timing error: Unable to find the start time for a module build."
630+
"629": "Invariant: Module is recorded after the report is generated. This is a Next.js internal bug.",
631+
"630": "Invariant: Module is missing a required debugId. This is a Next.js internal bug.",
632+
"631": "Invariant: Unable to find the start time for a module build. This is a Next.js internal bug.",
633+
"632": "Invariant: Circular dependency detected in module graph. This is a Next.js internal bug."
637634
}

packages/next/src/build/webpack-config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1945,12 +1945,12 @@ export default async function getBaseWebpackConfig(
19451945
require('./webpack/plugins/telemetry-plugin/telemetry-plugin') as typeof import('./webpack/plugins/telemetry-plugin/telemetry-plugin')
19461946
).TelemetryPlugin(new Map()),
19471947
dev &&
1948-
config.experimental?.slowModuleDetectionWebpack &&
1948+
config.experimental?.slowModuleDetection &&
19491949
new (
19501950
require('./webpack/plugins/slow-module-detection-plugin') as typeof import('./webpack/plugins/slow-module-detection-plugin')
19511951
).default({
19521952
compilerType,
1953-
...config.experimental.slowModuleDetectionWebpack,
1953+
...config.experimental.slowModuleDetection,
19541954
}),
19551955
].filter(Boolean as any as ExcludesFalse),
19561956
}

packages/next/src/build/webpack/loaders/get-module-build-info.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type ModuleBuildInfo = {
1616
importLocByPath?: Map<string, any>
1717
rootDir?: string
1818
rsc?: RSCMeta
19+
slowModuleDetectionTiming?: number
1920
}
2021

2122
/**

0 commit comments

Comments
 (0)