You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 496744a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(parser): give a synthesized namespace the spec's shape and identity (#22087)
* fix(parser): give a synthesized namespace the spec's shape
A module with no ESM namespace of its own — JSON, text, CommonJS — has one
synthesized at the import site, and that path never consulted
`specNamespaceObject`, so `__esModule` sat beside `default` where the spec
reports one name. Wrap it like the namespace a module owns; the marker stays
on the object underneath, so interop still reads it.
Unskips `import/import-attributes/{json,text}-via-namespace.js`.
* fix(parser): hand one synthesized namespace to every importer
A namespace webpack synthesizes is built at the import site, so two importers
of one JSON, text or CommonJS module were handed objects that looked alike but
were not the same, where the spec has one namespace per module. Cache it on the
module's record, which a reload replaces, keyed by the mode whose merge bit
decides which names it carries.
* fix(parser): fold the ChunkGraph type import into the one above it
* fix(parser): keep the fake namespace mode argument a constant
0 commit comments