Skip to content

Commit 1e24322

Browse files
committed
fix(plugin-vue): add deprecated script.propsDestructure option
fixes nuxt/nuxt#28295 closes #431
1 parent 5d592cd commit 1e24322

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/plugin-vue/src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ export interface Options {
5858
* using Vue 3.4 or above.
5959
*/
6060
defineModel?: boolean
61+
/**
62+
* @deprecated moved to `features.propsDestructure`.
63+
*/
64+
propsDestructure?: boolean
6165
}
6266
template?: Partial<
6367
Omit<

packages/plugin-vue/src/script.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ export function resolveScript(
8282
? scriptIdentifier
8383
: undefined,
8484
customElement,
85-
propsDestructure: options.features?.propsDestructure,
85+
propsDestructure:
86+
options.features?.propsDestructure ?? options.script?.propsDestructure,
8687
})
8788

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

0 commit comments

Comments
 (0)