diff --git a/packages/vite/src/client.ts b/packages/vite/src/client.ts index 1ee964cc8f..f254a365f2 100644 --- a/packages/vite/src/client.ts +++ b/packages/vite/src/client.ts @@ -21,6 +21,7 @@ export async function buildClient (ctx: ViteBuildContext) { const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, { entry: ctx.entry, + base: './', experimental: { renderBuiltUrl: (filename, { type, hostType }) => { if (hostType !== 'js' || type === 'asset') {