samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
323 stars 33 forks source link

Question: how to enable vue devtools? #110

Closed inbound-be closed 1 year ago

inbound-be commented 1 year ago

Hi,

Thanks for the great plugin, is working great! I do however have a question. I'm creating a chrome extension with Vue but I would like to be able to debug a litter better by using the vue-devtools chrome extension. But I can't manage setting this up for some reason.

Any idea what I would be doing wrong?

I've changed my vite.config so it looks like this but that didn't help.


import VueDevTools from 'vite-plugin-vue-devtools'
import { defineConfig } from "vite"
import { getManifest } from "./src/manifest"
import path from "path"
import vue from "@vitejs/plugin-vue"
import webExtension from "@samrum/vite-plugin-web-extension"

// https://vitejs.dev/config/
export default defineConfig(() => {
  return {
    plugins: [
      VueDevTools(),
      vue(),
      webExtension({
        manifest: getManifest(),
      }),
    ],
    resolve: {
      alias: {
        "~": path.resolve(__dirname, "./src"),
      },
    },
  };
});
samrum commented 1 year ago

I don't know all of the specifics of what you'd need to do to set up it up fully, but you'd need to use the standalone version of the dev tools: https://devtools.vuejs.org/guide/installation.html#standalone

samrum commented 1 year ago

Closing this since it's more of a general extension question and not plugin related.