Skip to content

Commit

Permalink
fix(schema): remove defineModel option as it is now stable (#25306)
Browse files Browse the repository at this point in the history
  • Loading branch information
manniL committed Jan 19, 2024
1 parent ce7845c commit 040cd97
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
3 changes: 1 addition & 2 deletions docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,11 @@ export default defineNuxtConfig({

### Enabling Experimental Vue Features

You may need to enable experimental features in Vue, such as `defineModel` or `propsDestructure`. Nuxt provides an easy way to do that in `nuxt.config.ts`, no matter which builder you are using:
You may need to enable experimental features in Vue, such as `propsDestructure`. Nuxt provides an easy way to do that in `nuxt.config.ts`, no matter which builder you are using:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
vue: {
defineModel: true,
propsDestructure: true
}
})
Expand Down
7 changes: 0 additions & 7 deletions packages/schema/src/config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ export default defineUntypedSchema({
* @type {boolean}
*/
propsDestructure: false,

/**
* Vue Experimental: Enable macro `defineModel`
* @see [Vue RFC#503](https://github.com/vuejs/rfcs/discussions/503)
* @type {boolean}
*/
defineModel: false
},

/**
Expand Down
3 changes: 0 additions & 3 deletions packages/schema/src/config/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ export default defineUntypedSchema({
script: {
propsDestructure: {
$resolve: async (val, get) => val ?? Boolean((await get('vue')).propsDestructure)
},
defineModel: {
$resolve: async (val, get) => val ?? Boolean((await get('vue')).defineModel)
}
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/schema/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export default defineUntypedSchema({
},
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: {
Expand Down

0 comments on commit 040cd97

Please sign in to comment.