antfu / vitesse-webext

⚡️ WebExtension Vite Starter Template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion: content-script Support for using vue

guowenfh opened this issue · comments

Currently for Content Script Using"build:js": "tsup src/background src/content --format iife --out-dir extension/dist --no-splitting" does not support inserting vue components in the page. I think many people have such a scene. Do you think is a good idea?

Sorry I am not sure if I understand your use case. Can you provide some examples?

image
image

Examples include the translation plugin and the github directory tree plugin, Both require some script to be inserted into the content of the page, and I want this part to support vue components
https://github.com/ineo6/git-master/
https://saladict.crimx.com/

I see. I think we could use Vite lib mode to do that. PR welcome.

Same here

When insert customer element to origin web , this feature is useful.

EG:

image

content/index.js

import { createApp } from 'vue'
import Hello from './Hello.vue'

createApp(Hello).mount('#app')

An error has occurred, i don't know how to solve it 😢

image

@antfu @guowenfh @wensonsmith I created a PR #17. It add Vue.js support to content_script.