In 55th and 56th FF on win7 I am getting following error: SyntaxError: import declarations may only appear at top level of a module
Component: General → WebExtensions: General
Severity: normal → enhancement
status-firefox57: --- → wontfix
Priority: -- → P3
If you want to use ES6 modules in your background page, you need to create an HTML page and use <script type="module"> in it rather than relying on the framework to generate a background page for you.
This is probably blocked until bug 1240072 is fixed, or at least far enough along. After that, it would be a simple matter of adding `manifest.background.module` property.
Depends on: 1240072
What’s missing for module support to be sufficiently far along? I don’t see anything critical except for bug 1371551
Point is, even if we implement it, it will not work for most users until the pref is flipped on by default. That said, bug 1428002 seems to be turning it on for Nightly only, which I guess means we could now land code behind the same pref.
You need to log in before you can comment on or make changes to this bug.