diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index 17d00add..2ac6d5b8 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -221,18 +221,18 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { dedupe: config.build?.ssr ? [] : ['vue'], }, define: { - __VUE_OPTIONS_API__: - (options.value.features?.optionsAPI || - config.define?.__VUE_OPTIONS_API__) ?? - true, - __VUE_PROD_DEVTOOLS__: - (options.value.features?.prodDevtools || - config.define?.__VUE_PROD_DEVTOOLS__) ?? - false, - __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: - (options.value.features?.prodHydrationMismatchDetails || - config.define?.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__) ?? - false, + __VUE_OPTIONS_API__: !!( + (options.value.features?.optionsAPI ?? true) || + config.define?.__VUE_OPTIONS_API__ + ), + __VUE_PROD_DEVTOOLS__: !!( + options.value.features?.prodDevtools || + config.define?.__VUE_PROD_DEVTOOLS__ + ), + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: !!( + options.value.features?.prodHydrationMismatchDetails || + config.define?.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ + ), }, ssr: { // @ts-ignore -- config.legacy.buildSsrCjsExternalHeuristics will be removed in Vite 5