File tree Expand file tree Collapse file tree 3 files changed +39
-21
lines changed
mcp-server/fixtures/default-template Expand file tree Collapse file tree 3 files changed +39
-21
lines changed Original file line number Diff line number Diff line change 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
616module . exports = nextConfig
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments