HaxeFoundation / HaxeFoundation/haxe
[js] shallow-expose writes to global
Open
platform-javascript
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
According to the doc, `-D shallow-expose` should not write to the global window / export.
https://haxe.org/manual/target-javascript-expose.html#shallow-expose
3.2.1 generates the same code as that in the example.
But since 3.3.0 it writes to global, with `$hx_exports` declared as:
```js
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
```
Contributor guide
Assessment
This issue has not been assessed yet.