mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(vite): drop name prefix for client chunk file names (#26203)
This commit is contained in:
parent
5804d397ad
commit
b9168d0b0b
@ -122,8 +122,8 @@ export async function buildClient (ctx: ViteBuildContext) {
|
||||
// We want to respect users' own rollup output options
|
||||
clientConfig.build!.rollupOptions = defu(clientConfig.build!.rollupOptions!, {
|
||||
output: {
|
||||
chunkFileNames: ctx.nuxt.options.dev ? undefined : withoutLeadingSlash(join(ctx.nuxt.options.app.buildAssetsDir, '[name].[hash].js')),
|
||||
entryFileNames: ctx.nuxt.options.dev ? 'entry.js' : withoutLeadingSlash(join(ctx.nuxt.options.app.buildAssetsDir, '[name].[hash].js'))
|
||||
chunkFileNames: ctx.nuxt.options.dev ? undefined : withoutLeadingSlash(join(ctx.nuxt.options.app.buildAssetsDir, '[hash].js')),
|
||||
entryFileNames: ctx.nuxt.options.dev ? 'entry.js' : withoutLeadingSlash(join(ctx.nuxt.options.app.buildAssetsDir, '[hash].js'))
|
||||
} satisfies NonNullable<BuildOptions['rollupOptions']>['output']
|
||||
}) as any
|
||||
|
||||
|
14
test/fixtures/minimal/nuxt.config.ts
vendored
14
test/fixtures/minimal/nuxt.config.ts
vendored
@ -7,6 +7,20 @@ export default defineNuxtConfig({
|
||||
experimental: {
|
||||
externalVue: !testWithInlineVue
|
||||
},
|
||||
$production: {
|
||||
vite: {
|
||||
$client: {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
chunkFileNames: '_nuxt/[name].js',
|
||||
entryFileNames: '_nuxt/[name].js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
||||
nitro: {
|
||||
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) }
|
||||
|
Loading…
Reference in New Issue
Block a user