Anber / wyw-in-js

MIT License
229 stars 16 forks source link

`evaluate: true` seems to duplicate shared exports #99

Open Vap0r1ze opened 1 month ago

Vap0r1ze commented 1 month ago

When using evaluate: true, if a file has two exports that utilize a third "shared" export, then it seems the "shared" export will have it's initializer ran seperately for each of the exports that are imported elsewhere. This causes equality issues, and was specifically bad for me when I tried using Symbols as keys for my "theme object"

Minimal Reproduction: https://stackblitz.com/edit/wyw-in-js-symbol-bug-repro?file=src%2Fmain.tsx,src%2Fsymbol.ts