From 66d81cebe8fee40b9cd5534cdb368a8e3b15cabb Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 23 Nov 2023 11:19:32 +0800 Subject: [PATCH] chore: remove leftover references to reactivity transform --- packages/plugin-vue/README.md | 14 -------------- packages/plugin-vue/src/index.ts | 19 ------------------- packages/plugin-vue/src/script.ts | 1 - playground/vue/vite.config.ts | 8 +------- 4 files changed, 1 insertion(+), 41 deletions(-) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index 22c54bca..c62c25b7 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -31,7 +31,6 @@ export interface Options { | 'defineModel' | 'propsDestructure' | 'fs' - | 'reactivityTransform' > > @@ -56,19 +55,6 @@ export interface Options { */ customElement?: boolean | string | RegExp | (string | RegExp)[] - /** - * Enable Vue reactivity transform (experimental). - * https://vuejs.org/guide/extras/reactivity-transform.html - * - `true`: transform will be enabled for all vue,js(x),ts(x) files except - * those inside node_modules - * - `string | RegExp`: apply to vue + only matched files (will include - * node_modules, so specify directories if necessary) - * - `false`: disable in all cases - * - * @default false - */ - reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] - /** * Use custom compiler-sfc instance. Can be used to force a specific version. */ diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index 35afedbf..2892383e 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -44,7 +44,6 @@ export interface Options { | 'defineModel' | 'propsDestructure' | 'fs' - | 'reactivityTransform' | 'hoistStatic' > > @@ -69,23 +68,6 @@ export interface Options { */ customElement?: boolean | string | RegExp | (string | RegExp)[] - /** - * Enable Vue reactivity transform (experimental). - * https://vuejs.org/guide/extras/reactivity-transform.html - * - `true`: transform will be enabled for all vue,js(x),ts(x) files except - * those inside node_modules - * - `string | RegExp`: apply to vue + only matched files (will include - * node_modules, so specify directories if necessary) - * - `false`: disable in all cases - * - * @deprecated the Reactivity Transform proposal has been dropped. This - * feature will be removed from Vue core in 3.4. If you intend to continue - * using it, disable this and switch to the [Vue Macros implementation](https://vue-macros.sxzz.moe/features/reactivity-transform.html). - * - * @default false - */ - reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] - /** * Use custom compiler-sfc instance. Can be used to force a specific version. */ @@ -107,7 +89,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { compiler: null as any, // to be set in buildStart include: /\.vue$/, customElement: /\.ce\.vue$/, - reactivityTransform: false, ...rawOptions, root: process.cwd(), sourceMap: true, diff --git a/packages/plugin-vue/src/script.ts b/packages/plugin-vue/src/script.ts index ed0bd409..abe5a57e 100644 --- a/packages/plugin-vue/src/script.ts +++ b/packages/plugin-vue/src/script.ts @@ -65,7 +65,6 @@ export function resolveScript( id: descriptor.id, isProd: options.isProduction, inlineTemplate: isUseInlineTemplate(descriptor, !options.devServer), - reactivityTransform: options.reactivityTransform !== false, templateOptions: resolveTemplateCompilerOptions(descriptor, options, ssr), sourceMap: options.sourceMap, genDefaultAs: canInlineMain(descriptor, options) diff --git a/playground/vue/vite.config.ts b/playground/vue/vite.config.ts index 4f7d61b5..19fedbe4 100644 --- a/playground/vue/vite.config.ts +++ b/playground/vue/vite.config.ts @@ -9,13 +9,7 @@ export default defineConfig({ '@': __dirname, }, }, - plugins: [ - vuePlugin({ - reactivityTransform: true, - }), - splitVendorChunkPlugin(), - vueI18nPlugin, - ], + plugins: [vuePlugin(), splitVendorChunkPlugin(), vueI18nPlugin], build: { // to make tests faster minify: false,