Closed Bug 1808202 Opened 3 years ago Closed 3 years ago

Convert some 'common' newtab modules to ES modules

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [esmification-timeline])

Attachments

(3 files)

Splitting this out from bug 1780074 to focus on a small sub-set of modules initially.

We can move some files in browser/components/newtab/common across to ES modules, with only a small change to the jsm -> commonjs processor.

As far as I can tell, this all works correctly. There's still lots more to resolve, but this would be a step in the right direction.

This will allow easier development/changes as we proceed to migrate newtab code to ES modules.

The file was imported from https://github.com/k88hudson/babel-plugin-jsm-to-commonjs/blob/3fefb99f274c26dc743fadeb79153594a9e2b900/plugin.js
with LICENSE added, and formatted/fixed to ESLint standards.

Whiteboard: [esmification-timeline]
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5862825b3e62 Add babel-plugin-jsm-to-commonjs directly into the tree rather than importing. r=Mardak https://hg.mozilla.org/integration/autoland/rev/b10fcbb66751 Add ES import handling to jsm to commonjs converter. r=Mardak https://hg.mozilla.org/integration/autoland/rev/7fe2e65a09ff Convert newtab DeDupe.jsm, ActorConstants.jsm and Actions.jsm to ES modules and update imports. r=Mardak
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: