[Chrome Workers] Provide a module loader for chrome workers

RESOLVED DUPLICATE of bug 880664

Status

()

Toolkit
General
RESOLVED DUPLICATE of bug 880664
4 years ago
4 years ago

People

(Reporter: Yoric, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Async:P1])

Followup to bug 872421

> I still think you should not share require to allow relative require forms that are very common:
>
> `require("./foo/bar")`, require("../bar")`
>
> All you need is to capture `uri` and resolve to it. As a matter of fact I'd also encourage to implement
> `require.main` which usually takes full `url` and all the modules then are resolved relative to it.
>
> Both devtools and jetpack code now supports `require("foo/bar")` that resolves to `resource://gre/modules/commonjs/foo/bar.js`
> I think it maybe a good idea to support that too. Note that neither node or any other commonjs implementations I'm aware of
> treat `foo/bar` equivalent to `./foo/bar` quite the contrary, usually `foo/bar` is equivalent to `/foo/bar` where `/` is root of your program.
Depends on: 880664
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 880664
You need to log in before you can comment on or make changes to this bug.