Skip to content

Commit 99d65f8

Browse files
committed
fix: hook filter implementation
1 parent 97fe31c commit 99d65f8

File tree

6 files changed

+312
-143
lines changed

6 files changed

+312
-143
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"tiny-glob": "^0.2.9",
7171
"typescript": "^5.6.3",
7272
"typescript-eslint": "^8.13.0",
73-
"vite": "https://pkg.pr.new/vitejs/rolldown-vite@172",
73+
"vite": "https://pkg.pr.new/vitejs/rolldown-vite@12e3568",
7474
"vitest": "^2.1.4",
7575
"vue": "^3.2.25",
7676
"vue-i18n": "^11.1.2",
@@ -87,7 +87,10 @@
8787
"pnpm": {
8888
"overrides": {
8989
"rolldown": "https://pkg.pr.new/rolldown@4554"
90-
}
90+
},
91+
"onlyBuiltDependencies": [
92+
"esbuild"
93+
]
9194
},
9295
"license": "MIT",
9396
"lint-staged": {

packages/unplugin-vue-i18n/src/core/options.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { normalize } from 'pathe'
21
import { isString, isBoolean, isArray } from '@intlify/shared'
32

43
import type { PluginOptions } from '../types'
@@ -15,19 +14,6 @@ export function resolveOptions(options: PluginOptions) {
1514
: [options.onlyLocales]
1615
}
1716

18-
// normalize for `options.include`
19-
let include = options.include
20-
let exclude = undefined
21-
if (include) {
22-
if (isArray(include)) {
23-
include = include.map(item => normalize(item))
24-
} else if (isString(include)) {
25-
include = normalize(include)
26-
}
27-
} else {
28-
exclude = '**/**'
29-
}
30-
3117
const forceStringify = !!options.forceStringify
3218
const defaultSFCLang = isString(options.defaultSFCLang)
3319
? options.defaultSFCLang
@@ -81,8 +67,8 @@ export function resolveOptions(options: PluginOptions) {
8167
: null
8268

8369
return {
84-
include,
85-
exclude,
70+
include: options.include,
71+
exclude: options.exclude,
8672
module: moduleType,
8773
onlyLocales,
8874
forceStringify,

0 commit comments

Comments
 (0)