-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iitm wrappers copy exported primitives #118
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you export primitives in ESM, they are exposed as references which means they can be written to from elsewhere within the module. A reproduction of this behaviour can be seen in #113.
Because the iitm wrappers assign each export to a variable before re-exporting, primitive exports have their original value copied and the reference is lost.
This is where the code generation does that:
import-in-the-middle/hook.js
Lines 189 to 190 in 57d2459
The text was updated successfully, but these errors were encountered: