Skip to content

addCustomTab not working with sfc or vnode type under Firefox #931

@ggodlewski

Description

@ggodlewski

Firefox 140.0esr using debian
Vue DevTools 7.7.7

I added first example from https://devtools.vuejs.org/plugins/api#addcustomtab into my app.

It does not work in Firefox or Librewolf. In the extension's debug console I'm getting:

EvalError: call to Function() blocked by CSP

...

Content-Security-Policy: The page’s settings blocked a JavaScript eval (script-src) from being executed because it violates the following directive: “script-src 'self'” (Missing 'unsafe-eval') [chunk-JBFUC7OX.js:530:7012](moz-extension://a836d2fe-7325-4b3b-a32d-ec802212510c/dist/chunk-JBFUC7OX.js)

SFC works fine when running as vite plugin or standalone app.

I also tried:

import Count from './count.vue';

addCustomTab({
  name: 'plugin-count2',
  title: 'Plugin Count2',
  icon: 'baseline-exposure-plus-1',
  view: {
    type: 'vnode',
    vnode: Count,
  },
  category: 'app',
})

No error, empty tab.
VNode type does not work at all in FF, vite or standalone app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions