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

feat: mangle private properties #1039

Closed
wants to merge 1 commit into from

Conversation

pauldambra
Copy link
Member

terser will mangle properties that match a regex, otherwise class fields don't get mangled

we have field names like startCaptureAndTrySendingQueuedSnapshots

makes everything private in session recording class prefixed with an _ and tells terser to mangle it

opening PR to see whether it helps, if each field is only referenced once then it won't have much impact

Copy link

Size Change: -27.2 kB (-3%)

Total Size: 827 kB

Filename Size Change
dist/array.full.js 177 kB -6.38 kB (-3%)
dist/array.js 118 kB -6.26 kB (-5%)
dist/es.js 118 kB -6.25 kB (-5%)
dist/exception-autocapture.js 11.8 kB -202 B (-2%)
dist/module.js 119 kB -6.25 kB (-5%)
dist/recorder-v2.js 106 kB -286 B (0%)
dist/recorder.js 58.4 kB -162 B (0%)
dist/surveys-module-previews.js 61.2 kB -749 B (-1%)
dist/surveys.js 57.6 kB -685 B (-1%)

compressed-size-action

@pauldambra pauldambra closed this Feb 25, 2024
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.

1 participant