This document shows a possible migration path from Cu.import()
to ES modules for the code of Firefox.
Use standard JavaScript, to simplify the use of third-party tools (e.g. static analysis, code rewriting, smart IDEs) and onboarding of new developers.
- Preserve current JSM semantics where multiple imports of a single module from different globals results in a single module instance that lives in a separate global to the importer.
- Add-ons and Thunderbird should not be affected by the migration.