Skip to content

Commit 1bac86a

Browse files
authored
refactor(vue-jsx): remove @babel/plugin-syntax-import-meta (#10233)
1 parent ed40a65 commit 1bac86a

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

packages/plugin-vue-jsx/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx#readme",
3737
"dependencies": {
3838
"@babel/core": "^7.19.1",
39-
"@babel/plugin-syntax-import-meta": "^7.10.4",
4039
"@babel/plugin-transform-typescript": "^7.19.1",
4140
"@vue/babel-plugin-jsx": "^1.1.1"
4241
},

packages/plugin-vue-jsx/src/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import path from 'node:path'
33
import type { types } from '@babel/core'
44
import * as babel from '@babel/core'
55
import jsx from '@vue/babel-plugin-jsx'
6-
// @ts-expect-error missing type
7-
import importMeta from '@babel/plugin-syntax-import-meta'
86
import { createFilter, normalizePath } from 'vite'
97
import type { ComponentOptions } from 'vue'
108
import type { Plugin } from 'vite'
@@ -83,7 +81,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
8381
// use id for script blocks in Vue SFCs (e.g. `App.vue?vue&type=script&lang.jsx`)
8482
// use filepath for plain jsx files (e.g. App.jsx)
8583
if (filter(id) || filter(filepath)) {
86-
const plugins = [importMeta, [jsx, babelPluginOptions], ...babelPlugins]
84+
const plugins = [[jsx, babelPluginOptions], ...babelPlugins]
8785
if (id.endsWith('.tsx') || filepath.endsWith('.tsx')) {
8886
plugins.push([
8987
// @ts-ignore missing type

pnpm-lock.yaml

-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)