6b58b55c32
- 将单体 style.css 拆分为 tokens/reset/fonts/layout/responsive/组件级 CSS 模块 - 从 Google Fonts CDN 迁移至本地自托管字体(JetBrainsMono、NotoSansSC) - 引入 Vitest + Testing Library 测试体系,新增单元测试 - 添加 GitHub Actions CI 流水线(lint → build → test) - 新增 Prettier 格式化与 ESLint 规则强化 - 重构全部 YAML 数据文件,完善项目详情页(截图轮播、更新日志) - 新增项目文档编写指南(docs/create-project.md)
34 lines
751 B
TypeScript
34 lines
751 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes('node_modules/react') || id.includes('node_modules/react-router')) {
|
|
return 'vendor-react';
|
|
}
|
|
if (id.includes('node_modules/lucide')) {
|
|
return 'vendor-lucide';
|
|
}
|
|
},
|
|
},
|
|
},
|
|
assetsInlineLimit: 4096,
|
|
},
|
|
server: {
|
|
warmup: {
|
|
clientFiles: ['./src/data/loader.ts'],
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './src/test/setup.ts',
|
|
css: true,
|
|
},
|
|
});
|