Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: hook filter implementation
  • Loading branch information
kazupon committed May 17, 2025
commit 99d65f887ff07087bb2e24df6299269444969b9c
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"tiny-glob": "^0.2.9",
"typescript": "^5.6.3",
"typescript-eslint": "^8.13.0",
"vite": "https://pkg.pr.new/vitejs/rolldown-vite@172",
"vite": "https://pkg.pr.new/vitejs/rolldown-vite@12e3568",
"vitest": "^2.1.4",
"vue": "^3.2.25",
"vue-i18n": "^11.1.2",
Expand All @@ -87,7 +87,10 @@
"pnpm": {
"overrides": {
"rolldown": "https://pkg.pr.new/rolldown@4554"
}
},
"onlyBuiltDependencies": [
"esbuild"
]
},
"license": "MIT",
"lint-staged": {
Expand Down
18 changes: 2 additions & 16 deletions packages/unplugin-vue-i18n/src/core/options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { normalize } from 'pathe'
import { isString, isBoolean, isArray } from '@intlify/shared'

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

// normalize for `options.include`
let include = options.include
let exclude = undefined
if (include) {
if (isArray(include)) {
include = include.map(item => normalize(item))
} else if (isString(include)) {
include = normalize(include)
}
} else {
exclude = '**/**'
}

const forceStringify = !!options.forceStringify
const defaultSFCLang = isString(options.defaultSFCLang)
? options.defaultSFCLang
Expand Down Expand Up @@ -81,8 +67,8 @@ export function resolveOptions(options: PluginOptions) {
: null

return {
include,
exclude,
include: options.include,
exclude: options.exclude,
module: moduleType,
onlyLocales,
forceStringify,
Expand Down
Loading
Loading