|
|
@ -31,7 +31,7 @@ export async function bundle(
|
|
|
|
config: SiteConfig,
|
|
|
|
config: SiteConfig,
|
|
|
|
options: BuildOptions
|
|
|
|
options: BuildOptions
|
|
|
|
): Promise<{
|
|
|
|
): Promise<{
|
|
|
|
clientResult: RollupOutput
|
|
|
|
clientResult: RollupOutput | null
|
|
|
|
serverResult: RollupOutput
|
|
|
|
serverResult: RollupOutput
|
|
|
|
pageToHashMap: Record<string, string>
|
|
|
|
pageToHashMap: Record<string, string>
|
|
|
|
}> {
|
|
|
|
}> {
|
|
|
@ -142,16 +142,16 @@ export async function bundle(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
let clientResult: RollupOutput
|
|
|
|
let clientResult: RollupOutput | null
|
|
|
|
let serverResult: RollupOutput
|
|
|
|
let serverResult: RollupOutput
|
|
|
|
|
|
|
|
|
|
|
|
const spinner = ora()
|
|
|
|
const spinner = ora()
|
|
|
|
spinner.start('building client + server bundles...')
|
|
|
|
spinner.start('building client + server bundles...')
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
;[clientResult, serverResult] = await (Promise.all([
|
|
|
|
clientResult = config.mpa
|
|
|
|
config.mpa ? null : build(await resolveViteConfig(false)),
|
|
|
|
? null
|
|
|
|
build(await resolveViteConfig(true))
|
|
|
|
: ((await build(await resolveViteConfig(false))) as RollupOutput)
|
|
|
|
]) as Promise<[RollupOutput, RollupOutput]>)
|
|
|
|
serverResult = (await build(await resolveViteConfig(true))) as RollupOutput
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
spinner.stopAndPersist({
|
|
|
|
spinner.stopAndPersist({
|
|
|
|
symbol: failMark
|
|
|
|
symbol: failMark
|
|
|
|