feat(store): 重构应用状态管理,移除旧的 app-store 并引入 app-store-auto-imports
Some checks failed
CI/CD Pipeline / playwright (push) Successful in 4m10s
CI/CD Pipeline / build-and-deploy (push) Successful in 4m33s
测试最新依赖 / playwright (push) Successful in 2m16s
测试最新依赖 / build-and-test (push) Failing after 2m26s

This commit is contained in:
严浩
2025-10-29 23:37:31 +08:00
parent 2874fdfaa7
commit f81c7614be
9 changed files with 64 additions and 78 deletions

View File

@@ -63,7 +63,7 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
dirs: [
// 'src/utils',
'src/composables',
'src/stores',
// 'src/stores',
// 匹配所有 -auto-imports.ts / -auto-imports.tsx 结尾的文件
'src/**/*-auto-imports.{ts,tsx}',
],

View File

@@ -1,5 +1,6 @@
import type { PluginOption } from 'vite';
import { minify as minifyHtml } from 'html-minifier-terser';
import { loadEnv } from 'vite';
import type { ConfigEnv, PluginOption } from 'vite';
function IndexHtmlPlugin(): PluginOption {
return {
@@ -25,4 +26,7 @@ function IndexHtmlPlugin(): PluginOption {
};
}
export default [IndexHtmlPlugin()] satisfies PluginOption[];
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
const env = loadEnv(_configEnv.mode, process.cwd());
if (env.VITE_BUILD_MINIFY === 'true') return IndexHtmlPlugin();
}

View File

@@ -1,9 +1,13 @@
import type { ConfigEnv, PluginOption } from 'vite';
import { loadEnv } from 'vite';
export default [
// ...
] satisfies PluginOption;
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
return [];
const env = loadEnv(_configEnv.mode, process.cwd());
console.debug(`env :>> `, env);
// ...
return undefined;
}