File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed
packages/next/src/server/dev Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import {
37
37
} from './middleware-turbopack'
38
38
import { PageNotFoundError } from '../../shared/lib/utils'
39
39
import { debounce } from '../utils'
40
- import { deleteCache , deleteFromRequireCache } from './require-cache'
40
+ import { deleteCache } from './require-cache'
41
41
import {
42
42
clearAllModuleContexts ,
43
43
clearModuleContext ,
@@ -342,30 +342,12 @@ export async function createHotReloaderTurbopack(
342
342
343
343
resetFetch ( )
344
344
345
- const hasAppPaths = writtenEndpoint . serverPaths . some ( ( { path : p } ) =>
346
- p . startsWith ( 'server/app' )
347
- )
348
-
349
345
// Edge uses the browser runtime which already disposes chunks individually.
350
346
// TODO: process.env.NEXT_RUNTIME is 'nodejs' even though Node.js runtime is not used.
351
347
if ( '__turbopack_clear_chunk_cache__' in globalThis ) {
352
348
; ( globalThis as any ) . __turbopack_clear_chunk_cache__ ( )
353
349
}
354
350
355
- // TODO: Stop re-evaluating React Client once it relies on Turbopack's chunk cache.
356
- if ( hasAppPaths ) {
357
- deleteFromRequireCache (
358
- require . resolve (
359
- 'next/dist/compiled/next-server/app-page-turbo.runtime.dev.js'
360
- )
361
- )
362
- deleteFromRequireCache (
363
- require . resolve (
364
- 'next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js'
365
- )
366
- )
367
- }
368
-
369
351
const serverPaths = writtenEndpoint . serverPaths . map ( ( { path : p } ) =>
370
352
join ( distDir , p )
371
353
)
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import isError from '../../lib/is-error'
2
2
import { realpathSync } from '../../lib/realpath'
3
3
import { clearManifestCache } from '../load-manifest.external'
4
4
5
- export function deleteFromRequireCache ( filePath : string ) {
5
+ function deleteFromRequireCache ( filePath : string ) {
6
6
try {
7
7
filePath = realpathSync ( filePath )
8
8
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments