webfansplz / vite-plugin-vue-devtools

Vite + Vue DevTools = DX 🔥
MIT License
1.63k stars 71 forks source link

Support Vite `base:` url prefix #260

Closed binaryfire closed 11 months ago

binaryfire commented 11 months ago

Hi guys

We have a Vue app with a base: prefix set in our Vite config like this:

export default defineConfig({
    base: '/app',
.........
})

We're using NGINX to route mydomain.com/app to the app. Everything works correctly except Vue Devtools. We're getting the following error in the console:

GET http://mydomain.com/@id/virtual:vue-devtools-path:app.js net::ERR_ABORTED 404 (Not Found)

The URL should include /app, i.e. the GET request should be made to http://mydomain.com/app/@id/virtual:vue-devtools-path:app.js. Is it possible to fix this so Vue Devtools respects base: if set?

pzgz commented 11 months ago

+1, same here, but it looks like this issue was only introduced in vite v5, reverted to vite 4.5, there's no issue

euaaaio commented 11 months ago

The same issue was in a previous rc release and Vite, but only with the inspector: virtual:vue-inspector-path:load.js. Now, with the release of Vite 5 and the latest rc release, devtools no longer works.

webfansplz commented 11 months ago

Released in v1.0.0-rc.7 , upgrade and try again 🙏