SpeedCurve-Metrics / lux.js

Web performance testing (real user monitoring) by SpeedCurve
https://speedcurve.com/features/lux/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Use const enums to reduce output size #19

Open josephwynn-sc opened 1 year ago

josephwynn-sc commented 1 year ago

I can't replicate this any more, but at one point the lux.min.js output size increased because Terser stopped minifying/mangling the LogEvent and Flags property names. This change uses const enums rather than plain objects, so TypeScript never outputs the property names.