fix(vite): provide fallback alias for #app-manifest (#30587)

This commit is contained in:
Daniel Roe 2025-01-14 17:36:00 +00:00 committed by GitHub
parent 0a2b01fbc4
commit 4187f68139
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,6 +110,9 @@ export async function buildClient (ctx: ViteBuildContext) {
}, },
resolve: { resolve: {
alias: { alias: {
// work around vite optimizer bug
'#app-manifest': 'unenv/runtime/mock/empty',
// user aliases
...nodeCompat.alias, ...nodeCompat.alias,
...ctx.config.resolve?.alias, ...ctx.config.resolve?.alias,
'nitro/runtime': join(ctx.nuxt.options.buildDir, 'nitro.client.mjs'), 'nitro/runtime': join(ctx.nuxt.options.buildDir, 'nitro.client.mjs'),