fix(bridge): enable vite build by default (#1709)

This commit is contained in:
Anthony Fu 2021-11-05 16:51:15 +08:00 committed by GitHub
parent f461591647
commit 91b428eeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -10,11 +10,6 @@ export default defineNuxtModule<ViteOptions>({
version, version,
configKey: 'vite', configKey: 'vite',
setup (viteOptions, nuxt) { setup (viteOptions, nuxt) {
// Only enable for development or production if `build: true` is set
if (!nuxt.options.dev && !viteOptions.build) {
return
}
nuxt.options.cli.badgeMessages.push(`⚡ Vite Mode Enabled (v${version})`) nuxt.options.cli.badgeMessages.push(`⚡ Vite Mode Enabled (v${version})`)
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
if (viteOptions.experimentWarning !== false && !nuxt.options.test) { if (viteOptions.experimentWarning !== false && !nuxt.options.test) {

View File

@ -21,6 +21,5 @@ export default defineNuxtConfig({
bridge: { bridge: {
meta: true, meta: true,
vite: !!process.env.TEST_BRIDGE_VITE vite: !!process.env.TEST_BRIDGE_VITE
}, }
vite: process.env.TEST_BRIDGE_VITE ? { build: {} } : undefined
}) })