archives

« Bugzilla Issues Index

#3293 — 8.6.1 HostNormalizeModuleName needs parentName


Modules have relative normalization:

app/main.js:
import './dep.js';

Should import "app/dep.js" not "dep.js" at the root-level.

We need to know the normalized name of the parent when normalizing in order to get this functionality:

HostNormalizeModuleName(unnormalizedName, parentNormalizedName)


This is critical


(In reply to Guy Bedford from comment #0)
> Modules have relative normalization:
>
> app/main.js:
> import './dep.js';
>
> Should import "app/dep.js" not "dep.js" at the root-level.

Actually, this is host defined and not specified in the ES spec.

>
> We need to know the normalized name of the parent when normalizing in order
> to get this functionality:
>
> HostNormalizeModuleName(unnormalizedName, parentNormalizedName)

But I agree this hook is need to enable the host to define such an interpretation.

Fixed in rev29 editor's draft

Also need to updated the signature of NormalizeModuleName


fixed in rev29