Skip to content

[Q/A] How to import other files on chrome.scripting.executeScript.func #204

Answered by louisgv
xmsz asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah this is due to the import context - the module are not eval'ed. You can try import the source file as text data instead:

data-text:./a

Also see this example: https://github.com/PlasmoHQ/examples/tree/main/with-main-world-content-script-injection <- we will expand it a bit more down the line.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xmsz
Comment options

@louisgv
Comment options

Answer selected by louisgv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants