mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): use baseURL + assetsDir as base in dev mode (#7234)
This commit is contained in:
parent
4bd1be9174
commit
1abd5f1959
@ -24,7 +24,9 @@ export async function buildClient (ctx: ViteBuildContext) {
|
||||
|
||||
const clientConfig: vite.InlineConfig = vite.mergeConfig(ctx.config, {
|
||||
entry: ctx.entry,
|
||||
base: './',
|
||||
base: ctx.nuxt.options.dev
|
||||
? joinURL(ctx.nuxt.options.app.baseURL.replace(/^\.\//, '/') || '/', ctx.nuxt.options.app.buildAssetsDir)
|
||||
: './',
|
||||
experimental: {
|
||||
renderBuiltUrl: (filename, { type, hostType }) => {
|
||||
if (hostType !== 'js' || type === 'asset') {
|
||||
|
Loading…
Reference in New Issue
Block a user