Manifest v3 + Vue 2/3 in popup

1,651 views
Skip to first unread message

DevUnion

unread,
Nov 9, 2021, 1:00:19 PM11/9/21
to Chromium Extensions
Have anyone been able to create chrome extension with manifest v3 using Vue3 app inside popup? I'm getting the problem with `new Function()` call inside the Vue 3. Does anyone have any solution for this problem?

hrg...@gmail.com

unread,
Nov 9, 2021, 3:06:01 PM11/9/21
to Chromium Extensions, DevUnion
Function() requires the evaluation of Javascript, like eval() does. Extensions are not allowed to use eval() or any other way of evaluating an arbitrary string of Javascript unless you explicitly request the permission to do so in the manifest.

Read more about it here:

DevUnion

unread,
Nov 9, 2021, 3:27:39 PM11/9/21
to Chromium Extensions, hrg...@gmail.com, DevUnion
Thank you for the response. I understand the problem, but unable to find solution at the moment. Sandboxing does not work because all chrome extension APIs became unavailable. And I can't find any solution to establish messages passing between background worker and popup script.

Simeon Vincent

unread,
Nov 10, 2021, 6:14:22 PM11/10/21
to DevUnion, Chromium Extensions, hrg...@gmail.com
I'm not terribly familiar with Vue.js, but based on their docs it seems like you may be using the full build rather than the runtime-only version of the library. You will need to precompile your templates in order to use them inside extensions pages.

Simeon - @dotproto
Chrome Extensions DevRel


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/0104ea65-8581-448a-af23-196160c9733dn%40chromium.org.

sakthi

unread,
Aug 27, 2023, 11:45:09 PM8/27/23
to Chromium Extensions, DevUnion
Hi , there .Did you find, how to run Vue js in chrome Extension?? if so, can you send that code?

Kamil Banach

unread,
Aug 30, 2023, 10:01:24 AM8/30/23
to Chromium Extensions, sakthi, DevUnion
Hi,
I had similar problem ("can I use Vue with MV3?") and as a result I have created template that works:
It uses Manifest V3, Typescript, Vite + Vue3 and contains some example code (including popup with Vue3 and calling Chrome API inside).

BR,
Kamil
Reply all
Reply to author
Forward
0 new messages