Skip to content

Vue 3 Starter cannot find Vue when using Vue Router #1510

@tony19

Description

@tony19

Description of Bug

When importing vue-router in the Vue 3 Starter, an error appears:

Error in /turbo_modules/vue-router@4.0.8/dist/vue-router.global.js (3365:7)

Vue is not defined

https://stackblitz.com/edit/stackblitz-bug-vue-router-cannot-find-vue

Steps to Reproduce

  1. Open Vue 3 Starter
  2. In the Dependencies panel, add vue-router@4.
  3. In src/main.js, insert import { createRouter } from 'vue-router'
  4. See error in preview window.

Expected Behavior

vue-router is imported without error.

Screenshots/Screencast

Screen Shot 2021-06-15 at 10 02 32 PM

Additional Context/Questions

  • macOS BigSur
  • Chrome 91

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions