feat(vscode): 增强开发调试配置支持
Some checks failed
/ build-and-test (push) Failing after 1m24s
/ playwright (push) Successful in 1m46s
CI/CD Pipeline / build-and-deploy (push) Failing after 2m2s
CI/CD Pipeline / playwright (push) Successful in 4m5s

This commit is contained in:
严浩
2025-10-16 16:37:40 +08:00
parent 4e31d8b80c
commit 7b6f7ad2fb
8 changed files with 129 additions and 57 deletions

73
README-command.md Normal file
View File

@@ -0,0 +1,73 @@
## 依赖管理
```shell
pnpm dedupe
```
去除重复的依赖包。当你的项目中存在多个版本的同一个包时pnpm dedupe 会尝试将它们合并成尽可能少的版本,从而减少 node_modules 的体积。
```bash
pnpm dlx taze major --interactive
```
交互式地将项目依赖升级到最新的主要版本,可以逐个选择要升级哪些包。
```bash
pnpm dlx knip
```
检测项目中未使用的依赖、导出和文件,帮助清理冗余代码。
## Playwright
```bash
playwright test
```
- `HEADLESS=true`:强制无头模式
- `--ui`:启动 Playwright 的图形用户界面,方便调试测试用例
- `--project=chromium`:指定使用 Chromium 浏览器进行测试
- `--quiet`:减少输出信息,只显示必要的内容
## Oxlint
```bash
oxlint . --fix --ignore-path=.gitignore --print-config
```
```bash
oxlint . --fix --deny=correctness
```
## Wrangler
### Pages
```bash
wrangler pages deploy dist --project-name=vue-ts-example-2025 --branch=preview
```
```bash
wrangler pages deploy dist --project-name=vue-ts-example-2025
```
### Workers
```bash
wrangler deploy
```
```bash
wrangler versions upload
```
## 拆包体积分析
- https://github.com/nonzzz/vite-bundle-analyzer
- https://github.com/KusStar/vite-bundle-visualizer
```bash
pnpm dlx vite-bundle-visualizer -t treemap
pnpm dlx vite-bundle-visualizer -t sunburst
pnpm dlx vite-bundle-visualizer -t network
```