mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(schema): use new options syntax for vite-plugin-vue
(#28307)
This commit is contained in:
parent
c62e210b84
commit
9ae094cafb
@ -56,13 +56,21 @@ export default defineUntypedSchema({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
script: {
|
script: {
|
||||||
propsDestructure: {
|
|
||||||
$resolve: async (val, get) => val ?? Boolean((await get('vue') as Record<string, any>).propsDestructure),
|
|
||||||
},
|
|
||||||
hoistStatic: {
|
hoistStatic: {
|
||||||
$resolve: async (val, get) => val ?? (await get('vue') as Record<string, any>).compilerOptions?.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: {
|
vueJsx: {
|
||||||
$resolve: async (val: Record<string, any>, get) => {
|
$resolve: async (val: Record<string, any>, get) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user