New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web Extension Transformer] doesn't support executeScript
, insertCSS
, contentScript.register
,runtime.getURL
#5758
Comments
executeScript
, insertCSS
and executeScript
, insertCSS
and contentScript.register
If we're doing this, might as well support |
Ambiguos. Say, I've 4 files in |
@avalanche1 After building with Parcel the two are identical. Globs are automatically expanded by the transformer for web extensions. |
Currently does not work due to parcel-bundler/parcel#5758
executeScript
, insertCSS
and contentScript.register
executeScript
, insertCSS
, contentScript.register
,runtime.getURL
Just to clarify this issue, today you can do the following: import yourCSSFile from 'url:./to-inject.css';
browser.tabs.insertCSS(id, {file: yourCSSFile});
// Similar for other import types Also, |
That's pretty good. Can it be mentioned in the docs? I'm sure I'll forget about it in 3 hours 😅 |
Also |
Actually I tried |
🙋 feature request
There are 3 ways to inject files in a WebExtension:
So they should add a dependency to the graph because they work similarly to an
import
when they use thefile
property and generate those files in thedist
folder.🤔 Expected Behavior
should start traversing the
/ghost-text.js
and/ghost-text.css
files.😯 Current Behavior
They aren't handled
💻 Examples
More examples can be found on the linked pages and in https://github.com/GhostText/GhostText/blob/f2e1dcd869a2c3bba8aae2b15612a347a6e5be98/browser/scripts/background.js#L38-L44
Slightly unrelated, but Manifest v3 is coming with some additional
manifest.json
keys to consider:action.default_popup
action.default_icon
web_accessible_resources.resources
And Firefox supports some custom ones too:
user_scripts.*
theme.images
The text was updated successfully, but these errors were encountered: