We are running into a bad problem with the publishing of the firefox web extension. The problem is that there is a limitation on the size of each JS file to not exceed 4MB, and our background script is now 4.4MB. The other problem is that Firefox used to not support dynamic imports in the background script, thus forcing us to need to bundle. In a nutshell, this is what the problem looks like:
-
Firefox does not support dynamic imports —> must bundle the JS in order to run the background script.
-
Firefox imposes a JS file size limit of 4MB —> must not bundle and must use import to run the background script.
Therefore, we are stuck now. Should we bundle, or should we use import? If we bundle, we can’t even sign our extension anymore. If we don’t bundle, we can’t run the extension in all older versions of firefox. Therefore, both approaches are now wrong.
Can someone please advise on what we should do here? Thanks in advance for your kind help.