@ -14,7 +14,6 @@ import { APP_PATH } from '../alias'
import type { SiteConfig } from '../config'
import type { SiteConfig } from '../config'
import { createVitePressPlugin , type PageMeta } from '../plugin'
import { createVitePressPlugin , type PageMeta } from '../plugin'
import { escapeRegExp , sanitizeFileName , slash } from '../shared'
import { escapeRegExp , sanitizeFileName , slash } from '../shared'
import { task } from '../utils/task'
import { buildMPAClient } from './buildMPAClient'
import { buildMPAClient } from './buildMPAClient'
// https://github.com/vitejs/vite/blob/a55d0b34400e3360c4100d05e422ae9cf10fa07b/packages/vite/src/node/constants.ts#L50
// https://github.com/vitejs/vite/blob/a55d0b34400e3360c4100d05e422ae9cf10fa07b/packages/vite/src/node/constants.ts#L50
@ -135,20 +134,12 @@ export async function bundle(
configFile : config.vite?.configFile
configFile : config.vite?.configFile
} )
} )
let { clientResult , serverResult } = await task (
let clientResult = config . mpa
'building client + server bundles' ,
async ( ) = > {
const clientResult = config . mpa
? null
? null
: ( ( await build (
: ( ( await build ( await resolveViteConfig ( false ) ) ) as Rolldown . RolldownOutput )
await resolveViteConfig ( false )
) ) as Rolldown . RolldownOutput )
const serverResult = ( await build (
const serverResult = ( await build (
await resolveViteConfig ( true )
await resolveViteConfig ( true )
) ) as Rolldown . RolldownOutput
) ) as Rolldown . RolldownOutput
return { clientResult , serverResult }
}
)
if ( config . mpa ) {
if ( config . mpa ) {
// in MPA mode, we need to copy over the non-js asset files from the
// in MPA mode, we need to copy over the non-js asset files from the