0
0
mirror of https://github.com/jellyfin/jellyfin-vue.git synced 2025-04-17 06:06:06 +00:00
Files
Fernando Fernández 141427e122 feat(ui-toolkit): create unplugin-vue-components resolver
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
2025-01-25 00:06:49 +01:00

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`
};
}
}
};
}