fix(vite): pass relative url as default base (#6637)

This commit is contained in:
Daniel Roe 2022-08-15 14:10:53 +01:00 committed by GitHub
parent 8a28c430b0
commit 385fa6037a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ export async function buildClient (ctx: ViteBuildContext) {
const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, { const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, {
entry: ctx.entry, entry: ctx.entry,
base: './',
experimental: { experimental: {
renderBuiltUrl: (filename, { type, hostType }) => { renderBuiltUrl: (filename, { type, hostType }) => {
if (hostType !== 'js' || type === 'asset') { if (hostType !== 'js' || type === 'asset') {