webfansplz / vite-plugin-vue-inspector

jump to editor source code while click the element of browser automatically.
MIT License
691 stars 71 forks source link

feat: normalize request url #17

Closed aki77 closed 2 years ago

aki77 commented 2 years ago

Fixed to work even if the vite server port is changed. I use Vite Ruby.

webfansplz commented 2 years ago

Can you provide a mini repo ? It's work fine to me now with :

export default defineConfig({
  plugins: [Vue(), VueJsx(), Inspector({
    enabled: true,
    toggleButtonVisibility: "always",
  })],
  server: {
    https: true,
    port: 3333,
  },
})
aki77 commented 2 years ago

Thanks for the reply! Is it ok with mini repo made with vite + rails? The problem is not with serving index.html with vite, but when combined with a web server running outside of vite.

aki77 commented 2 years ago

With the current code, the request destination is always the same as the web server.

https://github.com/webfansplz/vite-plugin-vue-inspector/blob/b1f50ab8d62867d721c9e90a26cc505be27344b9/src/Overlay.vue#L163

aki77 commented 2 years ago

Thanks!