fix(vite): fix type issue with legacy dev bundler

This commit is contained in:
Daniel Roe 2024-07-01 23:33:52 +01:00
parent c222fe7aa9
commit f9fa1a3e99
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -8,7 +8,7 @@ import { normalizeViteManifest } from 'vue-bundle-renderer'
import type { Manifest } from 'vue-bundle-renderer' import type { Manifest } from 'vue-bundle-renderer'
import type { ViteBuildContext } from './vite' import type { ViteBuildContext } from './vite'
export async function writeManifest (ctx: ViteBuildContext) { export async function writeManifest (ctx: ViteBuildContext, css: string[] = []) {
// Write client manifest for use in vue-bundle-renderer // Write client manifest for use in vue-bundle-renderer
const clientDist = resolve(ctx.nuxt.options.buildDir, 'dist/client') const clientDist = resolve(ctx.nuxt.options.buildDir, 'dist/client')
const serverDist = resolve(ctx.nuxt.options.buildDir, 'dist/server') const serverDist = resolve(ctx.nuxt.options.buildDir, 'dist/server')
@ -17,7 +17,7 @@ export async function writeManifest (ctx: ViteBuildContext) {
'@vite/client': { '@vite/client': {
isEntry: true, isEntry: true,
file: '@vite/client', file: '@vite/client',
css: [], css,
module: true, module: true,
resourceType: 'script', resourceType: 'script',
}, },