Skip to content

Commit 5861ba2

Browse files
committed
fix: mcp-server test case
1 parent fa8f4ab commit 5861ba2

File tree

3 files changed

+39
-21
lines changed

3 files changed

+39
-21
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
/**
22
* @type {import('next').NextConfig}
33
*/
4-
const nextConfig = {}
4+
const nextConfig = {
5+
webpack(config) {
6+
if (process.env.NEXT_RSPACK) {
7+
// Disable persistent cache when using Rspack.
8+
// Rspack's persistent cache may reuse the previously compiled pages.
9+
// This differs from webpack in dev mode, which typically builds only the page being requested.
10+
config.cache = false
11+
}
12+
return config
13+
},
14+
}
515

616
module.exports = nextConfig

test/development/basic/hmr/run-error-recovery-hmr-test.util.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -442,25 +442,23 @@ export function runErrorRecoveryHmrTest(nextConfig: {
442442
} else if (process.env.NEXT_RSPACK) {
443443
expect(trimEndMultiline(await getRedboxSource(browser)))
444444
.toMatchInlineSnapshot(`
445-
"./components/parse-error.xyz
446-
× Module parse failed:
447-
╰─▶ × JavaScript parse error: Expression expected
448-
╭─[3:0]
449-
1 │ This
450-
2 │ is
451-
3 │ }}}
452-
· ─
453-
4 │ invalid
454-
5 │ js
455-
╰────
456-
457-
help:
458-
You may need an appropriate loader to handle this file type.
459-
460-
Import trace for requested module:
461-
./components/parse-error.xyz
462-
./pages/hmr/about8.js"
463-
`)
445+
"./components/parse-error.xyz
446+
× Module parse failed:
447+
╰─▶ × JavaScript parse error: Expression expected
448+
╭─[3:0]
449+
1 │ This
450+
2 │ is
451+
3 │ }}}
452+
· ─
453+
4 │ invalid
454+
5 │ js
455+
╰────
456+
help:
457+
You may need an appropriate loader to handle this file type.
458+
Import trace for requested module:
459+
./components/parse-error.xyz
460+
./pages/hmr/about8.js"
461+
`)
464462
} else {
465463
expect(await getRedboxSource(browser)).toMatchInlineSnapshot(`
466464
"./components/parse-error.xyz
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
module.exports = {}
1+
module.exports = {
2+
webpack(config) {
3+
if (process.env.NEXT_RSPACK) {
4+
// Disable persistent cache when using Rspack.
5+
// Rspack's persistent cache may reuse the previously compiled pages.
6+
// This differs from webpack in dev mode, which typically builds only the page being requested.
7+
config.cache = false
8+
}
9+
return config
10+
}
11+
}

0 commit comments

Comments
 (0)