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
|
// We want to respect users' own rollup output options
|
||||||
clientConfig.build!.rollupOptions = defu(clientConfig.build!.rollupOptions!, {
|
clientConfig.build!.rollupOptions = defu(clientConfig.build!.rollupOptions!, {
|
||||||
output: {
|
output: {
|
||||||
chunkFileNames: ctx.nuxt.options.dev ? undefined : 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, '[name].[hash].js'))
|
entryFileNames: ctx.nuxt.options.dev ? 'entry.js' : withoutLeadingSlash(join(ctx.nuxt.options.app.buildAssetsDir, '[hash].js'))
|
||||||
} satisfies NonNullable<BuildOptions['rollupOptions']>['output']
|
} satisfies NonNullable<BuildOptions['rollupOptions']>['output']
|
||||||
}) as any
|
}) 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: {
|
experimental: {
|
||||||
externalVue: !testWithInlineVue
|
externalVue: !testWithInlineVue
|
||||||
},
|
},
|
||||||
|
$production: {
|
||||||
|
vite: {
|
||||||
|
$client: {
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
chunkFileNames: '_nuxt/[name].js',
|
||||||
|
entryFileNames: '_nuxt/[name].js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
||||||
nitro: {
|
nitro: {
|
||||||
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) }
|
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) }
|
||||||
|
Loading…
Reference in New Issue
Block a user