mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
14 lines
466 B
TypeScript
14 lines
466 B
TypeScript
import type { App, Plugin } from 'vue'
|
|
|
|
const paths: Record<string, { default: Component }> = import.meta.glob(['./*/*.vue', './*.vue', './OverlayScrollbarsComponent.ts'], { eager: true })
|
|
|
|
export default {
|
|
install: (app: App) => {
|
|
for (const path in paths) {
|
|
const splitPath = path.split('/')
|
|
const name = splitPath[splitPath.length - 1].replace('.vue', '').replace('.ts', '')
|
|
app.component(name, paths[path].default)
|
|
}
|
|
},
|
|
} as Plugin
|