feat: refactor Vite plugin loading mechanism and improve plugin management
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 3m3s
CI/CD Pipeline / build-and-deploy (push) Successful in 2m6s

This commit is contained in:
严浩
2025-12-12 00:09:53 +08:00
parent 7f1811098f
commit 9e050306bb
21 changed files with 370 additions and 260 deletions

View File

@@ -1,7 +1,8 @@
import type { ConfigEnv, PluginOption } from 'vite';
import UnoCSS from 'unocss/vite';
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
import type { LoadPluginFunction } from './_loadPlugins';
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
return [
// https://github.com/antfu/unocss
// see uno.config.ts for config
@@ -9,4 +10,4 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
checkImport: true,
}),
];
}
};