fix(schema): use new options syntax for vite-plugin-vue (#28307)

This commit is contained in:
Yasser Lahbibi 2024-08-05 19:08:58 +02:00 committed by Daniel Roe
parent 809891de06
commit 91a6a5e269
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -56,13 +56,21 @@ export default defineUntypedSchema({
},
},
script: {
propsDestructure: {
$resolve: async (val, get) => val ?? Boolean((await get('vue') as Record<string, any>).propsDestructure),
},
hoistStatic: {
$resolve: async (val, get) => val ?? (await get('vue') as Record<string, any>).compilerOptions?.hoistStatic,
},
},
features: {
propsDestructure: {
$resolve: async (val, get) => {
if (val !== undefined && val !== null) {
return val
}
const vueOptions = await get('vue') as Record<string, any> || {}
return Boolean(vueOptions.script?.propsDestructure ?? vueOptions.propsDestructure)
},
},
},
},
vueJsx: {
$resolve: async (val: Record<string, any>, get) => {