1- import path from 'node:path'
21import { setTimeout } from 'node:timers/promises'
32import {
43 type BindingClientHmrUpdate ,
@@ -9,14 +8,14 @@ import type { RolldownOutput } from 'rolldown'
98import colors from 'picocolors'
109import getEtag from 'etag'
1110import { ChunkMetadataMap , resolveRolldownOptions } from '../build'
11+ import { BUNDLED_DEV_CLIENT_FILENAME } from '../constants'
1212import { getHmrImplementation } from '../plugins/clientInjections'
1313import { createDebugger , formatAndTruncateFileList } from '../utils'
1414import type { DevEnvironment } from './environment'
1515import { type NormalizedHotChannelClient , debugHmr , getShortName } from './hmr'
1616import { prepareError } from './middlewares/error'
1717
1818const debug = createDebugger ( 'vite:full-bundle-mode' )
19- const BUNDLED_DEV_CLIENT_FILENAME = 'bundledDevClient.mjs'
2019
2120type HmrOutput = BindingClientHmrUpdate [ 'update' ]
2221
@@ -375,15 +374,8 @@ export class BundledDev {
375374 }
376375 for ( const outputFile of output ) {
377376 this . memoryFiles . set ( outputFile . fileName , ( ) => {
378- let source =
377+ const source =
379378 outputFile . type === 'chunk' ? outputFile . code : outputFile . source
380- if ( outputFile . type === 'chunk' && outputFile . isEntry ) {
381- const runtimePath = path . posix . join (
382- this . environment . config . base ,
383- BUNDLED_DEV_CLIENT_FILENAME ,
384- )
385- source = `import ${ JSON . stringify ( runtimePath ) } \n${ source } `
386- }
387379 return {
388380 source,
389381 etag : getEtag ( Buffer . from ( source ) , { weak : true } ) ,
0 commit comments