Vu3 is currently version 3.2 github

Cloning project

git clone https://github.com/vuejs/vue-next.git
Copy the code

The preparatory work

  • Vue3.0 usepnpmCode package management, need to be installed first, domestic Settings Taobao mirror
npm install -g pnpm
pnpm config set registry https://registry.npm.taobao.org
Copy the code
  • Chrome

Install dependencies

Puppeteer in package.json can be temporarily removed (not required), which is time-consuming and not needed for debugging code

pnpm install
Copy the code

The configuration script

Package. json added — Sourcemap for easy debugging

"scripts": {
    "dev": "node scripts/dev.js --sourcemap",
    ...
}
Copy the code

packaging

pnpm dev
Copy the code

The service

Debug the existing example in the project

pnpm serve
Copy the code

/packages/vue/examples/composition/todomvc

debugging

  • The consoleSourcesShortcut keys inctrl + pfindtodomvc

  • Find the entrancecreatAppBreak point, refresh the page to find vUE entry file location/packages/runtime-dom/src/index.ts