Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Aug 11, 2023

This PR changes the Symbol class name to Token so that it doesn't conflict with the native Symbol object in webpacked files. Webpacking of ESM files handles the exports from the component lib files as global variables, and that means the Symbol object will overwrite the native one, and since the webpack initialization code refers to Symbol before that const Symbol is set up, that cause a compile error. (The old CommonJS modules.export approach didn't use separate global variables, so didn't have that problem.)

Along with this, it renames SymbolMap to TokenMap, and changes variables called symbol to token, where appropriate.

Unfortunately, this touches a lot of files.

Resolves issue mathjax/MathJax#3072.

@dpvc dpvc requested a review from zorkow August 11, 2023 18:09
@dpvc dpvc added this to the v4.0 milestone Aug 15, 2023
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not review all files in detail. I built, tested in the lab and with my own test page. It works fine.

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

Successfully merging this pull request may close these issues.

3 participants