diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index b9f15b86..35afedbf 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -9,7 +9,6 @@ import type { SFCTemplateCompileOptions, } from 'vue/compiler-sfc' import type * as _compiler from 'vue/compiler-sfc' -import type { ExistingRawSourceMap } from 'rollup' /* eslint-enable import/no-duplicates */ import { computed, shallowRef } from 'vue' import { version } from '../package.json' @@ -124,13 +123,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { ? () => options.value.customElement as boolean : createFilter(options.value.customElement), ) - const refTransformFilter = computed(() => - options.value.reactivityTransform === false - ? () => false - : options.value.reactivityTransform === true - ? createFilter(/\.(j|t)sx?$/, /node_modules/) - : createFilter(options.value.reactivityTransform), - ) return { name: 'vite:vue', @@ -255,19 +247,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { } if (!filter.value(filename) && !query.vue) { - if ( - !query.vue && - refTransformFilter.value(filename) && - options.value.compiler.shouldTransformRef(code) - ) { - const result = options.value.compiler.transformRef(code, { - filename, - sourceMap: true, - }) - return result as Omit & { - map: ExistingRawSourceMap | null - } - } return } diff --git a/playground/vue/Main.vue b/playground/vue/Main.vue index fec9c40e..e7bc898a 100644 --- a/playground/vue/Main.vue +++ b/playground/vue/Main.vue @@ -24,7 +24,6 @@ - @@ -50,7 +49,6 @@ import Slotted from './Slotted.vue' import ScanDep from './ScanDep.vue' import TsImport from './TsImport.vue' import AsyncComponent from './AsyncComponent.vue' -import ReactivityTransform from './ReactivityTransform.vue' import SetupImportTemplate from './setup-import-template/SetupImportTemplate.vue' import WorkerTest from './worker.vue' import { ref } from 'vue' diff --git a/playground/vue/ReactivityTransform.vue b/playground/vue/ReactivityTransform.vue deleted file mode 100644 index 0dc2b093..00000000 --- a/playground/vue/ReactivityTransform.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/playground/vue/__tests__/vue.spec.ts b/playground/vue/__tests__/vue.spec.ts index 2428e627..cfbed95d 100644 --- a/playground/vue/__tests__/vue.spec.ts +++ b/playground/vue/__tests__/vue.spec.ts @@ -268,14 +268,6 @@ describe('async component', () => { }) }) -describe('ref transform', () => { - test('should work', async () => { - expect(await page.textContent('.ref-transform')).toMatch('0') - await page.click('.ref-transform') - expect(await page.textContent('.ref-transform')).toMatch('1') - }) -}) - describe('custom element', () => { test('should work', async () => { await page.click('.custom-element') diff --git a/playground/vue/setup-import-template/SetupImportTemplate.vue b/playground/vue/setup-import-template/SetupImportTemplate.vue index d7fb119e..cb91d27a 100644 --- a/playground/vue/setup-import-template/SetupImportTemplate.vue +++ b/playground/vue/setup-import-template/SetupImportTemplate.vue @@ -1,5 +1,6 @@