JS output should not use `this` in strict mode
pengx17 opened this issue · 2 comments
pengx17 commented
When I try to use this repo in the browser, I see an error related to the output that it uses this
instead of globalThis
or window
.
See the last line of https://unpkg.com/mldoc@1.1.8/index.js
The whole js is an IIFE like this:
(function(joo_global_object)
(function(){return this}()));
This may be related to ocsigen/js_of_ocaml#699
There is a potential fix to add wrap-with-fun
flag or command, but I do not understand OCaml or its tools. In the test I do a manual patch to mldoc
instead. Not sure if the issue will fixed by logseq team or not?
tiensonqin commented
@RCmerci Any ideas?