Hi Leo, I’m a newbie. I don’t know how to direct my question to the right person.
When I upload an addon update to Firefox - as I have done before - all my files with module “imports” are rejected.
They test out OKAY in Firefox 61 (I’m not using developer or nightly). Do you know why the javascript modules might be rejected? Is it because I’m not using the .mjs extension in the filename? (I’m using .js)
This refers to a Firefox “addon”. Javascript modules are a new ES6 construct. My addon is being rejected when I upload to: Add-ons for Firefox (en-US). Leo has directed me to:
Do you load the initial script as module? Or do you use the “normal” scripts key to load them in the manifest? In order for import statements to be allowed, you need to load you initial script as module. You can currently only do that with a <script type="module"> tag in HTML and not directly from the manifest. This also means that you can not load content scripts as modules.
P.S.: your post has been moved to the add-on development category already.
Thanx for your reply and help. I would have to re-upload to generate the errors - however; I deleted the zip and have modified my files to have a .mjs extension on all my imported files and am now in limbo.
However; @freaktechnik has given me some additional info which I will pursue.
I am assuming that AMO will handle the .mjs, imports and exports once I have everything configured correctly. ONCE AGAIN, THANX FOR THE HELP!!
Thanx for your reply and help. I would have to re-upload to generate the errors - however; I deleted the zip and have modified my files to have a .mjs extension on all my imported files and am now in limbo.
However; you have given me some additional info which I will pursue.
I am assuming that AMO will handle the .mjs, imports and exports once I have everything configured correctly. ONCE AGAIN, THANX FOR THE HELP!!