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 fde3842
Browse filesBrowse the repository at this point in the historyBrowse files
feat: resolve imported ESM bindings by name in a debugger
Imported bindings compile to a namespace read, so a debugger's console
and watch expressions cannot resolve the name the source uses (#3957).
Two complementary halves, both semantics-preserving:
`optimization.localImportBindings` (on in development) declares a real
local variable for an imported name wherever that is observationally
equal to the live binding: a namespace object, whose identity never
changes, and a named import of a top-level `const` or an `export
default` expression, which the language pins to one value. A module read
from inside its own evaluation cycle, or accepted by `module.hot.accept`
(where an update re-runs the import statement rather than the module
body), keeps reading through the namespace.
A `-scopes` devtool suffix emits the ECMA-426 "Scopes" field, naming for
every remaining binding the generated expression it reads. It changes no
emitted code and costs bytes only in the map.
* @property {Map<string, string>=} importBindings what each imported binding of the current module reads, by its name in the source, for the source map `scopes` field
0 commit comments