mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(schema): add types for vue experimental features (#21364)
This commit is contained in:
parent
5d9973da49
commit
1e6d640bf7
@ -20,6 +20,20 @@ export default defineUntypedSchema({
|
||||
runtimeCompiler: {
|
||||
$resolve: async (val, get) => val ?? await get('experimental.runtimeVueCompiler') ?? false,
|
||||
},
|
||||
|
||||
/**
|
||||
* Vue Experimental: Enable reactive destructure for `defineProps`
|
||||
* @see [Vue RFC#502](https://github.com/vuejs/rfcs/discussions/502)
|
||||
* @type {boolean}
|
||||
*/
|
||||
propsDestructure: false,
|
||||
|
||||
/**
|
||||
* Vue Experimental: Enable macro `defineModel`
|
||||
* @see [Vue RFC#503](https://github.com/vuejs/rfcs/discussions/503)
|
||||
* @type {boolean}
|
||||
*/
|
||||
defineModel: false
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -40,6 +40,14 @@ export default defineUntypedSchema({
|
||||
compilerOptions: {
|
||||
$resolve: async (val, get) => val ?? (await get('vue')).compilerOptions
|
||||
}
|
||||
},
|
||||
script: {
|
||||
propsDestructure: {
|
||||
$resolve: async (val, get) => val ?? Boolean((await get('vue')).propsDestructure),
|
||||
},
|
||||
defineModel: {
|
||||
$resolve: async (val, get) => val ?? Boolean((await get('vue')).defineModel),
|
||||
},
|
||||
}
|
||||
},
|
||||
vueJsx: {
|
||||
|
@ -164,6 +164,8 @@ export default defineUntypedSchema({
|
||||
embed: 'src'
|
||||
},
|
||||
compilerOptions: { $resolve: async (val, get) => val ?? (await get('vue.compilerOptions')) },
|
||||
propsDestructure: { $resolve: async (val, get) => val ?? Boolean(await get('vue.propsDestructure')) },
|
||||
defineModel: { $resolve: async (val, get) => val ?? Boolean(await get('vue.defineModel')) },
|
||||
},
|
||||
css: {
|
||||
importLoaders: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user