diff --git a/packages/schema/src/config/vite.ts b/packages/schema/src/config/vite.ts index a8da7e0cd4..7587e0700b 100644 --- a/packages/schema/src/config/vite.ts +++ b/packages/schema/src/config/vite.ts @@ -56,13 +56,21 @@ export default defineUntypedSchema({ }, }, script: { - propsDestructure: { - $resolve: async (val, get) => val ?? Boolean((await get('vue') as Record).propsDestructure), - }, hoistStatic: { $resolve: async (val, get) => val ?? (await get('vue') as Record).compilerOptions?.hoistStatic, }, }, + features: { + propsDestructure: { + $resolve: async (val, get) => { + if (val !== undefined && val !== null) { + return val + } + const vueOptions = await get('vue') as Record || {} + return Boolean(vueOptions.script?.propsDestructure ?? vueOptions.propsDestructure) + }, + }, + }, }, vueJsx: { $resolve: async (val: Record, get) => {