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

ESM dependency #67

Open
alex-mashin opened this issue Dec 27, 2024 · 2 comments
Open

ESM dependency #67

alex-mashin opened this issue Dec 27, 2024 · 2 comments

Comments

@alex-mashin
Copy link

alex-mashin commented Dec 27, 2024

Since node.js 20.10, ESM module does not work (standard-things/esm/#931), and as the repository was archived on exactly the same day that the issue was filed, it is not likely that ESM will be fixed.

The examples in the repository depend on ESM. Can this dependency be removed? If it can, could the developers update the examples, or at least give the general guidelines how to remove the dependency?

@alex-mashin
Copy link
Author

Replacing require with something like import( 'mathjax-full/es5/node-main.js' ).then(…) can help.

@dpvc
Copy link
Member

dpvc commented Dec 30, 2024

Version 4 (currently out in beta release) has both ESM and CommonJS versions. The demos will be updated for the official release.

Not all the demos here use the esm library. For example, the "direct" versions in

https://github.com/mathjax/MathJax-demos-node/tree/master/direct

don'e use esm. The v3 demos use esmwhen you are loading the MathJax components from source, but if you use the--dist` command-line option available on most of the demos, it should not be needed.

In any case, the demos will be updated for v4 what that is officially released.

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

No branches or pull requests

2 participants