vite-plugin-vue-devtools icon indicating copy to clipboard operation
vite-plugin-vue-devtools copied to clipboard

Support for unplugin-vue-router

Open Ragura opened this issue 2 years ago • 3 comments

First of all, thanks for building this extension!

In our project we are using unplugin-vue-router which generates pages according to a folder/file structure and syntax, much like it does for Nuxt. This does not get picked up by the tools (router tab says router is not installed). Is there anything you could do on your side to support this?

Ragura avatar May 30 '23 13:05 Ragura

Can you provide a mini repo? 🙏 (I've tested unplugin-vue-router in playground, It's work fine.)

webfansplz avatar May 31 '23 01:05 webfansplz

It appears to be related to how our components/routes are set up and not directly because of unplugin-vue-router. Upon further testing the routes show up after some navigation has occurred (the route is no longer just localhost:3000), but not when the app has just loaded. The App.vue file contains this:

<component :is="$route.meta.layout === 'full-screen' ? LayoutFullSreen : LayoutDefault" />
<LogReport />

This renders the layout component which has a <router-view> component within a <suspense> component within a <main> tag with Element Plus' v-loading directive attached. The login page then renders, but the routes still don't show up. All this time the only component that is displayed in the component inspector is <ElLoading> (An Element Plus loading component).

Only after navigating to a route like /assignments do all the routes and components suddenly pop up in the list. Honestly, this isn't a big deal and is probably very specific to our project.

I'm sorry I can't provide a small reproduction, because it seems to be very tightly related to our (rather complicated) App set up.

Ragura avatar May 31 '23 13:05 Ragura

I use ElementPlus's v-loading directive and noticed the same exact issue, @Ragura.

bkoplin avatar Jun 01 '23 10:06 bkoplin