mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(bridge): enable vite build by default (#1709)
This commit is contained in:
parent
f461591647
commit
91b428eeea
@ -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) {
|
||||||
|
3
test/fixtures/bridge/nuxt.config.ts
vendored
3
test/fixtures/bridge/nuxt.config.ts
vendored
@ -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
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user