Check the console logs to find the following errors logged:
Uncaught ReferenceError: Vue is not defined
<anonymous> https://unpkg.com/vue-router@next:3605
[vue-router@next:3605:8](https://unpkg.com/vue-router@next)
<anonymous> https://unpkg.com/vue-router@next:3605
Uncaught TypeError: VueRouter is undefined
<anonymous> https://hb9lh.csb.app/:25
Expected behavior
The sandbox working
Actual behavior
Sandbox does not load Vue and breaks the initialization of VueRouter.
It's broken because this <script src="https://unpkg.com/vue@next"></script> does not actually load Vue as https://unpkg.com/vue@next does not resolve a Vue version (responds with Cannot find package vue@next).
Reproduction
https://codesandbox.io/p/sandbox/vue-router-4-reproduction-hb9lh
Steps to reproduce the bug
Expected behavior
The sandbox working
Actual behavior
Sandbox does not load Vue and breaks the initialization of VueRouter.
It's broken because this
<script src="https://unpkg.com/vue@next"></script>
does not actually load Vue as https://unpkg.com/vue@next does not resolve a Vue version (responds withCannot find package vue@next
).It seems this needs to be replaced with either https://unpkg.com/vue@latest or https://unpkg.com/vue@3 as these do work.
Additional information
This is not really related to the repo/package code 😅