Files
vue-ts-example-2025/README-command.md
严浩 7b6f7ad2fb
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
feat(vscode): 增强开发调试配置支持
2025-10-16 16:37:40 +08:00

74 lines
1.4 KiB
Markdown
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.
## 依赖管理
```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
```