-
Notifications
You must be signed in to change notification settings - Fork 144
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
Linter fails on await import #2498
Comments
Unfortunately We'd have to port to use https://github.com/babel/babel-eslint/ or similar to add support for this. I'm unclear about whether this is something we want to do. cc @rpl for a second opinion. |
@EnTeQuAk I took a quick look on bugzilla and searchfox for the actual status of the dynamic import on Firefox (and if there are known issues when using it in a WebExtension):
And so it seems to me that allowing its usage on the linter side may not be yet worth it, as it wouldn't be enough. We could allow the dynamic import to be used in extension pages (basically every extension context besides the content scripts) for extensions that are going to require Firefox 67 as the |
Marking this as p4 then, as support will most certainly propagate once that feature is lifted out of stage 3. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions. |
Is this still in stage 4? |
I believe so. |
We're going to move our background page from webpack to ES Module but it seems I can't do it now because it will not pass this linter. watch on this issue |
My Buddah! Over 1 year ago bug was opened, still no progress. I cannot sign my extension. |
I like to use dynamic import, so I had to do: |
@donbidon but how? Firefox doesn't support dynamic import in content script |
I made a webpack 4 plugin webpack-target-webextension that supports code-splitting with native dynamic import and with I also have a workaround solution for Firefox so that the dynamic import logic will be skipped. Currently I just replace the |
For anyone interested, I also made a SystemJS fork for WebExtension (https://github.com/Jack-Works/webextension-systemjs) System JS is a fully ES Module compatible module format which supports import.meta (after transform) and dynamic import. Here is a demo repo for this systemjs runtime: https://github.com/Jack-Works/web-extension-esmodule-test/tree/master/mixed In Chrome it will load the whole extension in ES module. In Firefox, it will load background script in ES module and load content script in System JS format. |
Describe the problem and steps to reproduce it:
I have a following code in my extension as content script.
What happened?
When I try to load the extension. the linter fails at
import
What did you expect to happen?
Linter to pass
Anything else we should know?
The extension is this
(Please include screenshots and any relevant files.)
The text was updated successfully, but these errors were encountered: