fix(vite): respect users config (#2395)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
Anthony Fu 2021-12-17 17:28:06 +08:00 committed by GitHub
parent d91677e72f
commit 737f1bf80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,6 @@ async function bundle (nuxt: Nuxt, builder: any) {
nuxt,
builder,
config: vite.mergeConfig(
nuxt.options.vite || {},
{
root: nuxt.options.rootDir,
mode: nuxt.options.dev ? 'development' : 'production',
@ -79,7 +78,8 @@ async function bundle (nuxt: Nuxt, builder: any) {
jsxPlugin(),
defaultExportPlugin()
]
} as ViteOptions
} as ViteOptions,
nuxt.options.vite || {}
)
}

View File

@ -25,7 +25,6 @@ export async function bundle (nuxt: Nuxt) {
const ctx: ViteBuildContext = {
nuxt,
config: vite.mergeConfig(
nuxt.options.vite as any || {},
{
root: nuxt.options.srcDir,
mode: nuxt.options.dev ? 'development' : 'production',
@ -93,7 +92,8 @@ export async function bundle (nuxt: Nuxt) {
]
}
}
} as ViteOptions
} as ViteOptions,
nuxt.options.vite as any || {}
)
}