Keep contentScripts individual
See original GitHub issueHi,
I find the vitesse-webext
project contains only one index.global.js
under contentScripts
. If I want to keep contentScript individual, what should I do?
There are some build configs in vite.config.content.ts
file, but I not so familiar with vite, could you please give me some example?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
How to keep the content script injected in a tab even if user ...
I have solved the problem. What I have done is, I have a listener to check if clicked object is hyperlink in my...
Read more >Content scripts - Mozilla - MDN Web Docs
A content script is a part of your extension that runs in the context of a particular web page (as opposed to background...
Read more >Chrome Extensions: Content Scripts - Programming with Text
In this video, I cover " content scripts " for chrome extensions. The content script is a JavaScript file that runs in the...
Read more >How to keep the content script alive in a tab even if user ...
So there is no way to keep a content script's js context alive. The solution to this is to use chrome.storage (https://developer.chrome.com/extensions/storage) ...
Read more >Chrome Extension — When to use content scripts and injected ...
As stated above, content scripts can access the embedding page's DOM. This gives a lot of power to the script as it can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it does not support multi entrypoints(or glob) yet. There are some ways to do that:
contentScripts/index.ts
, and use them at your needsvite.config.content.ts
, and changebuild.lib.entry
,manifest.ts
to add a new content-script fileLet clear the question again. I want to keep vue component in current
index.ts
and keep other content scripts in individual files because they will be inserted into tab page in different life cycle and with different functions.