vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.74k stars 1.15k forks source link

What should I do if I want to use vue-router through cdn in my website? #2240

Closed yonecdeng closed 1 month ago

yonecdeng commented 1 month ago

Reproduction

1

Steps to reproduce the bug

  1. vite project
  2. external 'vue-router' when you build your project.
  3. inject https://cdnjs.cloudflare.com/ajax/libs/vue-router/4.3.2/vue-router.esm-browser.min.js in your html.

Expected behavior

run normally

Actual behavior

throw error in chrome

image

Additional information

No response