Files
apes-sidebar/vitest.config.ts
T
figmar 0e91e99f49 feat(apes-sidebar): Phase 0 工程骨架 — host/client 分裂 + i18n + 不变量面
从 0 重写的 v2.0.0 DSH 侧边栏插件第一阶段:
- 工程骨架:tsdown 双构建(host ESM + client CJS closure)、vitest、strict TS
- host 半:namespace 插件形状(name/inject/apply,无 default),minimal apply
- client 半:closure factory 注册 5 个 apes:* tab 占位 + zh/en i18n
- 不变量面:assert/semver/peer guard(dsh-better-sidebar >= 0.18.0)
- 依赖策略:dsh-better-sidebar=peerDependency(不打包),cordis=devDependency(仅类型)
- 门禁:pnpm typecheck + build + test 全绿(14 单测通过)
- AGENTS.md 工程约定 + .gitignore(排除 lib/node_modules/maxkb-integration)

模板:dsh-better-sidebar。作用域锁定信息层(tasks/agents/apps/messages/profile),
不含 file/terminal/browser(归 better-sidebar)、不含 team/room(归 background-agents)。
2026-09-04 17:14:22 +08:00

28 lines
884 B
TypeScript

/**
* Vitest config: inline the npm-published `@deepseek-ai/*` packages whose
* BUILT lib bundles css side-effect imports. Installed from the npm registry
* these packages live under `node_modules/.pnpm` and are externalized by
* vitest — Node then chokes on the `.css` import. Inlining routes them
* through Vite's transform, which stubs css imports (the default `css: false`).
*/
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
server: {
deps: {
inline: [/@deepseek-ai\/dsh-client-ui-primitives/],
},
},
exclude: [
'tests/e2e/**',
'**/.worktrees/**',
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*',
],
},
})