Files
workspace/code/g3soft-libs/pnpm-workspace.yaml
T
2026-10-08 17:32:12 +08:00

36 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
packages:
- packages/*
- docs
# 统一 vue / typescript 版本:各包写 "vue": "catalog:",避免多版本漂移。
catalog:
vue: ^3.5.41
typescript: ^5.9.0
sass: ^1.80.0
# pnpm 11 的构建脚本白名单(map 形式;v10 的 onlyBuiltDependencies 数组写法在 v11 已失效)。
# better-sqlite3 —— Docus 全文搜索(FTS5)依赖的原生模块,必须放行才能下载/编译二进制
# vue-demi —— vue-docgen-api 的传递依赖,安装时要跑脚本切换 Vue 版本 shim
# esbuild —— Nuxt / Vite 底层
# @parcel/watcher —— Docs(Nuxt) dev 的文件监听原生模块,放行以启用快速热更新。
# 注意:pnpm 11 会把「未放行的构建脚本」当作错误让后续命令失败,
# 所以这个条目必须显式存在(true=放行,false=显式忽略)。
allowBuilds:
esbuild: true
better-sqlite3: true
vue-demi: true
'@parcel/watcher': true
# 依赖严格隔离(不开启 shamefully-hoist / nodeLinker: hoisted)。
#
# 重要:docs 包把 nuxt 精确锁在 4.4.8,不要放宽到 ^4.4.8 或升级到 4.5+。
# 原因见下表(@nuxt/vite-builder 是决定实际 Vite 版本的那个包):
# 4.4.8 → vite ^7.3.3 (Rollup 引擎,可用)
# 4.5.0 → vite ^8.1.4 (Rolldown)
# 4.6.0 → vite ^8.3.2 (Rolldown)
# Vite 8 换成 Rolldown 后,在 Windows 下无法解析 Nitro 生成的
# "file:///D:/..." 虚拟模块 import,会把 #nitro-internal-virtual/* 误判为外部依赖,
# 导致 Nuxt 的 internal/manifest 与 internal/precomputed 都拿不到值,页面一律 500
# (报错:Either manifest or precomputed data must be provided)。
# Docus 官方 starter 声明的正是 nuxt ^4.4.8,所以锁 4.4.8 与 Docus 完全兼容。