Skip to content

Commit 02e7575

Browse files
committed
chore: remove transformWithEsbuild
1 parent 6dd4e17 commit 02e7575

File tree

4 files changed

+39
-109
lines changed

4 files changed

+39
-109
lines changed

packages/vue-jsx-vapor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@
162162
"dependencies": {
163163
"@babel/core": "catalog:",
164164
"@babel/plugin-transform-typescript": "catalog:",
165-
"@types/hash-sum": "catalog:",
166165
"@vue-jsx-vapor/babel": "workspace:*",
167166
"@vue-jsx-vapor/compiler": "workspace:*",
168167
"@vue-jsx-vapor/macros": "workspace:*",
@@ -179,6 +178,7 @@
179178
"@nuxt/kit": "catalog:",
180179
"@nuxt/schema": "catalog:",
181180
"@types/babel__core": "catalog:",
181+
"@types/hash-sum": "catalog:",
182182
"csstype": "^3.1.3",
183183
"vue": "catalog:"
184184
}

packages/vue-jsx-vapor/src/unplugin.ts

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,13 @@
11
import { createUnplugin, type UnpluginFactory } from 'unplugin'
2-
import { createFilter, transformWithEsbuild } from 'vite'
32
import plugin from './raw'
43
import type { Options } from './options'
54

6-
export * from './options'
5+
export type { Options }
76

87
export const unpluginFactory: UnpluginFactory<Options | undefined, true> = (
98
options = {},
109
) => {
11-
return [
12-
...plugin(options),
13-
options.interop
14-
? { name: 'interop' }
15-
: {
16-
name: 'unplugin-esbuild',
17-
transformInclude: createFilter(
18-
options?.include || /\.[jt]sx$/,
19-
options?.exclude,
20-
),
21-
transform(code, id) {
22-
return transformWithEsbuild(code, id, {
23-
target: 'esnext',
24-
charset: 'utf8',
25-
minify: false,
26-
minifyIdentifiers: false,
27-
minifySyntax: false,
28-
minifyWhitespace: false,
29-
treeShaking: false,
30-
keepNames: false,
31-
supported: {
32-
'dynamic-import': true,
33-
'import-meta': true,
34-
},
35-
})
36-
},
37-
},
38-
]
10+
return plugin(options)
3911
}
4012

4113
export const unplugin = /* #__PURE__ */ createUnplugin(unpluginFactory)

pnpm-lock.yaml

Lines changed: 36 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)