Closed Bug 1778314 Opened 3 years ago Closed 3 years ago

Support system ESM in devtools loader

Categories

(DevTools :: General, task)

task

Tracking

(firefox104 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

During ESMification first step, the devtools code might have to support loading system ESM file with CommonJS require() function.

https://searchfox.org/mozilla-central/rev/3e1a721bce1da3ae04675539b39a4e95b25a046d/devtools/shared/loader/base-loader.js#315-317

} else if (isJSMURI(uri)) {
  module = modules[uri] = Module(requirement, uri);
  module.exports = ChromeUtils.import(uri);

Adding .sys.mjs pattern math and ChromeUtils.importESModule call in the branch might work.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Summary: Figure out what to do with require(".../foo.sys.mjs") → Support system ESM in devtools loader
Blocks: 1777486
No longer blocks: esm-ification
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/65224910bace Support system ESM in devtools loader. r=devtools-reviewers,ochameau
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: