mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2025-04-17 06:06:06 +00:00
20 lines
445 B
TypeScript
20 lines
445 B
TypeScript
import type { ComponentResolver } from 'unplugin-vue-components/types';
|
|
import pkg from '../package.json' with { type: 'json' };
|
|
|
|
/**
|
|
* Resolver for unplugin-vue-components
|
|
*/
|
|
export function JellyfinVueUIToolkit(): ComponentResolver {
|
|
return {
|
|
type: 'component',
|
|
resolve: (name: string) => {
|
|
if (/^J[A-Z]/.test(name)) {
|
|
return {
|
|
name,
|
|
from: `${pkg.name}/components`
|
|
};
|
|
}
|
|
}
|
|
};
|
|
}
|