chore: 增加 cjs 警告追踪命令

如果您不确定警告来自何处,可以使用 VITE_CJS_TRACE=true 标志运行脚本来记录堆栈跟踪

see: https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
This commit is contained in:
xiangshu233 2024-02-24 21:49:02 +08:00
parent d927b13470
commit 5de4e41022

View File

@ -18,6 +18,7 @@
"bootstrap": "pnpm install",
"serve": "npm run dev",
"dev": "vite",
"dev:debugcjs": "cross-env VITE_CJS_TRACE=true vite dev",
"build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
"build:no-cache": "pnpm clean:cache && npm run build",
"report": "cross-env REPORT=true npm run build",