mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-05-01 12:38:12 +08:00
19 lines
446 B
TypeScript
19 lines
446 B
TypeScript
import { fs, path } from 'vuepress/utils'
|
|
import { resolve } from '../utils.js'
|
|
|
|
export function resolveAlias() {
|
|
return {
|
|
...Object.fromEntries(
|
|
fs.readdirSync(
|
|
resolve('client/components'),
|
|
{ encoding: 'utf-8', recursive: true },
|
|
)
|
|
.filter(file => file.endsWith('.vue'))
|
|
.map(file => [
|
|
path.join('@theme', file),
|
|
resolve('client/components', file),
|
|
]),
|
|
),
|
|
}
|
|
}
|