MathJax
MathJax copied to clipboard
When using rollup, in order to use mathjax in strict mode, remove arguments.callee.
Is your feature request related to a problem? Please describe.
When using "rollup", in order to use mathjax in strict mode, remove "arguments.callee".
Because rollup requires modules to use strict mode.
Describe the solution you'd like https://github.com/mathjax/MathJax-src/issues/850
Describe alternatives you've considered
Additional context
See the discussion at mathjax/MathJax-src#850. Note that even if those changes are made, you may not be able to get rollup to work, as others have reported that rollup does not like the circular dependencies that are present in other parts of the code. See, for example, mathjax/MathJax-src#741, and #2368.
I've created a repository, have solved the arguments.callee issue, and have used rollup to package it, and the tests passed successfully! Cheers!
https://github.com/masx200/mathjax-module-async/tree/1.6.0
https://github.com/masx200/MathJax-src/tree/3.2.2-delete-arguments.callee
https://github.com/masx200/MathJax/tree/3.2.2-delete-arguments.callee
https://mathjax-module-async.vercel.app/
https://mathjax-module-async-masx200.netlify.app/
You can use webpack to package the files in "MathJax-src", put them in the "MathJax" repository, and then use the glue code of Proxy, and use rollup to package it once to solve the problem.
https://github.com/masx200/mathjax-module-async/blob/1.6.0/lib/loadmodules.ts https://github.com/masx200/mathjax-module-async/blob/1.6.0/lib/virtual_plugin_for_mathjax_init.ts https://github.com/masx200/mathjax-module-async/blob/1.6.0/lib/argskey.ts https://github.com/masx200/mathjax-module-async/blob/1.6.0/lib/get_function_mathjax_module_init.ts