Skip to content

Commit

Permalink
fix(plugin-vue): add deprecated script.propsDestructure option
Browse files Browse the repository at this point in the history
fixes nuxt/nuxt#28295
closes #431
  • Loading branch information
sxzz committed Aug 1, 2024
1 parent 5d592cd commit 1e24322
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/plugin-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export interface Options {
* using Vue 3.4 or above.
*/
defineModel?: boolean
/**
* @deprecated moved to `features.propsDestructure`.
*/
propsDestructure?: boolean
}
template?: Partial<
Omit<
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export function resolveScript(
? scriptIdentifier
: undefined,
customElement,
propsDestructure: options.features?.propsDestructure,
propsDestructure:
options.features?.propsDestructure ?? options.script?.propsDestructure,
})

if (!options.isProduction && resolved?.deps) {
Expand Down

0 comments on commit 1e24322

Please sign in to comment.