Skip to content

Commit cb68980

Browse files
committed
chore: use unplugin-utils
1 parent ba206e6 commit cb68980

File tree

5 files changed

+25
-157
lines changed

5 files changed

+25
-157
lines changed

packages/unplugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@
172172
"@babel/plugin-transform-typescript": "^7.26.8",
173173
"@vue-jsx-vapor/babel": "workspace:*",
174174
"@vue-jsx-vapor/compiler": "workspace:*",
175-
"@vue-macros/common": "^1.16.1",
176175
"magic-string-stack": "^0.1.1",
177-
"unplugin": "^1.11.0"
176+
"unplugin": "^1.11.0",
177+
"unplugin-utils": "^0.2.4"
178178
},
179179
"devDependencies": {
180180
"@nuxt/kit": "^3.12.3",

packages/unplugin/src/core/plugin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { createFilter, normalizePath } from '@vue-macros/common'
1+
import { createFilter, normalizePath } from 'unplugin-utils'
22
import { helperCode, helperId, helperPrefix, transformVueJsxVapor } from '.'
33
import type { Options } from '../types'
44
import type { UnpluginFactory } from 'unplugin'
55

66
export const plugin: UnpluginFactory<Options | undefined, false> = (
77
options: Options = {},
88
) => {
9-
const transformInclude = createFilter({
10-
include: options?.include || /\.[jt]sx$/,
11-
exclude: options?.exclude,
12-
})
9+
const transformInclude = createFilter(
10+
options?.include || /\.[jt]sx$/,
11+
options?.exclude,
12+
)
1313
return {
1414
name: 'unplugin-vue-jsx-vapor',
1515
vite: {

packages/unplugin/src/raw.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ import { plugin } from './core/plugin'
22
import type { Options } from './types'
33
import type { UnpluginFactoryOutput } from 'unplugin'
44

5-
export default plugin as unknown as UnpluginFactoryOutput<Options, false>
5+
export default plugin as unknown as UnpluginFactoryOutput<
6+
Options | undefined,
7+
false
8+
>

packages/unplugin/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FilterPattern } from 'vite'
1+
import type { FilterPattern } from 'unplugin-utils'
22
import type { CompilerOptions } from '@vue-jsx-vapor/compiler'
33

44
export interface Options {

0 commit comments

Comments
 (0)