Skip to content

Commit 4574acc

Browse files
mydealforst
andauthored
test(v8): Fix nextjs build warning (#15226)
This also needs to go into v8, I guess! --------- Co-authored-by: Luca Forstner <[email protected]>
1 parent 0cfcd6f commit 4574acc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dev-packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const buildStderr = fs.readFileSync('.tmp_build_stderr', 'utf-8');
1010

1111
// Assert that there was no funky build time warning when we are on a stable (pinned) version
1212
if (nextjsVersion !== 'latest' && !nextjsVersion.includes('-canary') && !nextjsVersion.includes('-rc')) {
13-
assert.doesNotMatch(buildStderr, /Import trace for requested module/); // This is Next.js/Webpack speech for "something is off"
13+
assert.doesNotMatch(buildStderr, /Import trace for requested module/, `Build warning in output:\n${buildStderr}`); // This is Next.js/Webpack speech for "something is off"
1414
}
1515

1616
// Assert that all static components stay static and all dynamic components stay dynamic

packages/nextjs/src/config/webpack.ts

+1
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ function addOtelWarningIgnoreRule(newConfig: WebpackConfigObjectWithModuleRules)
716716
// We provide these objects in addition to the hook above to provide redundancy in case the hook fails.
717717
{ module: /@opentelemetry\/instrumentation/, message: /Critical dependency/ },
718718
{ module: /@prisma\/instrumentation/, message: /Critical dependency/ },
719+
{ module: /require-in-the-middle/, message: /Critical dependency/ },
719720
] satisfies IgnoreWarningsOption;
720721

721722
if (newConfig.ignoreWarnings === undefined) {

0 commit comments

Comments
 (0)