IndexXuan / vue-cli-plugin-vite

Use vite today, with vue-cli.

Home Page:https://github.com/IndexXuan/vue-cli-plugin-vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

through @vue/cli@4.5.13 the created vue3 + TS project cannot use this plug-in normally

sh-winter opened this issue Β· comments

I use @vue/ cli@4.1.13 A vue3 + TS project was created, but after installing vue-cli-plugin-vite and starting it with the yarn vite command, the following error was thrown:

Uncaught TypeError: Cannot destructure property 'options' of 'inject(...)' as it is undefined.
    at setup (vue-router.esm-bundler.js:2119)
    at callWithErrorHandling (runtime-core.esm-bundler.js?v=1c50029a:154)
    at setupStatefulComponent (runtime-core.esm-bundler.js?v=1c50029a:6542)
    at setupComponent (runtime-core.esm-bundler.js?v=1c50029a:6503)
    at mountComponent (runtime-core.esm-bundler.js?v=1c50029a:4206)
    at processComponent (runtime-core.esm-bundler.js?v=1c50029a:4182)
    at patch (runtime-core.esm-bundler.js?v=1c50029a:3791)
    at mountChildren (runtime-core.esm-bundler.js?v=1c50029a:3975)
    at mountElement (runtime-core.esm-bundler.js?v=1c50029a:3896)
    at processElement (runtime-core.esm-bundler.js?v=1c50029a:3868)

I can't reproduce it here, please give a minimum reproducible link

I can't reproduce it here, please give a minimum reproducible link

@IndexXuan This is a basic example. You can click here to view it

will figure it out.

@IndexXuan πŸ‘

@sh-winter try v1.0.3.
unknown bug, fixed with hack way.

@IndexXuan πŸ‘Œ, πŸ˜˜πŸ’•