Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Fix problems related to use terser nameCache #966

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

Open
zyrong wants to merge 2 commits into developit:master
base: master
Choose a base branch
Loading
from zyrong:fix/terser-nameCache

Conversation

@zyrong
Copy link
Contributor

@zyrong zyrong commented May 20, 2022
edited
Loading

  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.
Copy link

changeset-bot bot commented May 20, 2022
edited
Loading

🦋 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
Co-authored-by: Ryan Christian <33403762+rschristian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rschristian rschristian rschristian left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /