1. 源码结构
本地部署、源码结构、如何调试
1. 本地部署
# 克隆 repo
$ git clone git@github.com:vuejs/router.git
$ cd router
# 安装项目的依赖,需要 Node.js 10+ 和 pnpm
$ pnpm install
# 执行脚本
$ pnpm build # 构建 vue-router
$ pnpm play # 启动 `playground/` 项目,以便在浏览器上测试和调试
$ pnpm test # 执行所有检查,包括 test:types, test:types, test:unit, build
2. Vue Router 源码
2.1 项目入口
2.2 项目结构
3. 调试 Vue Router 代码

Last updated

