Skip to content
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

Imports inside of injected scripts #666

Open
Katel1ne opened this issue Mar 13, 2023 · 0 comments
Open

Imports inside of injected scripts #666

Katel1ne opened this issue Mar 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Katel1ne
Copy link

Describe the problem

When you use imports inside of injected script, which is imported with "?script&module" you get following error
Uncaught SyntaxError: Cannot use import statement outside a module

Describe the proposed solution

Mostly I would like to see it for cross-layers messaging, which seems to be done by this package
zikaari/crx-bridge#11
Which was later forked as https://github.com/zikaari/webext-bridge
But it would be also handy to import some other utils' functions to share functionality rather then write it all over again for injected scripts.

Alternatives considered

I don't know if it can be achieved with current CRXJS version however, tried few ways w/o any success. If it's already possible - would be nice to see the solution.

Importance

would make my life easier

@Katel1ne Katel1ne added the enhancement New feature or request label Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant