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

fix: Fix problems related to use terser nameCache #966

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zyrong
Copy link
Contributor

@zyrong zyrong commented May 20, 2022

  1. The nameCache obtained in writebundle hook is not a reference to terseroptions
  2. JSON.stringify(nameCache) requires converting regex to a string first.

This commit fixes the problems related to terser namecache. When terser compresses the code, the damaged variable names will be written to the namecache. Finally, the namecache will be written to the file system in this code, but after my test, it doesn't seem to work here

1. The nameCache obtained in writebundle hook is not a reference to terseroptions
2. JSON.stringify(nameCache) requires converting regex to a string first.
@changeset-bot
Copy link

changeset-bot bot commented May 20, 2022

🦋 Changeset detected

Latest commit: 685962d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
microbundle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rschristian rschristian mentioned this pull request Jun 3, 2022
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.

None yet

2 participants