Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Why aren’t built‑in ESM exports synced automatically? #481

Closed
ExE-Boss opened this issue Jan 31, 2020 · 2 comments
Closed

Why aren’t built‑in ESM exports synced automatically? #481

ExE-Boss opened this issue Jan 31, 2020 · 2 comments

Comments

@ExE-Boss
Copy link

Currently, it’s necessary to manually call Module.syncBuiltinESMExports() after making changes to built‑in exports.

This makes me wonder why wasn’t this implemented using a Proxy‑based sync‑on‑write mechanism.

Proxy‑based sync‑on‑write solution could also only update the exports that changed, instead of looping over all built‑in modules and their exports.

@bmeck
Copy link
Member

bmeck commented Jan 31, 2020

This was the case (we did use a Proxy), but problem with accessors (particularly getters) caused issues. See:

@MylesBorins
Copy link
Contributor

I'm going to go ahead and close this as it seems like the original question was answered

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants