-
code:
show error
I found not only i can't import other file, i can't reference vars..
I think it a chrome's behaviour... And i try to add chrome.scripting.executeScript.args |
Beta Was this translation helpful? Give feedback.
Answered by
louisgv
Sep 14, 2022
Replies: 1 comment 2 replies
-
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:
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. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
louisgv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.