Enable Node-style module resolution for DevTools loader

NEW
Unassigned

Status

()

Firefox
Developer Tools
2 years ago
3 months ago

People

(Reporter: jryans, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Looks like we can enable Node-style resolution like:

resolve("devtools/bob")

loads `devtools/bob/index.js` if `bob` is a directory.

This should just mean setting `isNative: true` on the loader.
There may be some overhead here, as it checks to see if `bob.js` exists first, then `bob/{main}`, where {main} is defined by `bob/package.json`'s "main" entry, then `bob/index.js`.
You need to log in before you can comment on or make changes to this bug.