Skip to content
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

JS output should not use this in strict mode #109

Open
pengx17 opened this issue Nov 12, 2021 · 2 comments
Open

JS output should not use this in strict mode #109

pengx17 opened this issue Nov 12, 2021 · 2 comments

Comments

@pengx17
Copy link

pengx17 commented Nov 12, 2021

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/[email protected]/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
Copy link
Collaborator

@RCmerci Any ideas?

@Bad3r
Copy link

Bad3r commented Feb 1, 2023

@RCmerci should this issue remain open?

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

No branches or pull requests

3 participants