You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While checking lighthouse reports, I noticed abnormally large Potential Savings size in minify JS opportunity for a javascript file that is minified already.
What did you expect?
I expected the lighthouse report to not list minified JS files in this minify JS opportunity.
What have you tried?
I inspected the code of minification-estimator.js with that JS file I have encountered with this problem. Turns out that the file contained this patch of code in middle of the file: else/VALID_REGEX_PATTERN/.test(n)?(d=(new DOMParser).parseFromString("...
When the loop hit the /VALID_REGEX_PATTERN/, it doesn't consider it as a regex and the subsequent totalTokenLength calculation is messed up.
I added else in PUNCTUATOR_REGEX variable in minification-estimator.js, then it worked fine.
How were you running Lighthouse?
node
Lighthouse Version
11.1.0
Chrome Version
No response
Node Version
No response
OS
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
FAQ
URL
https://example.com
What happened?
While checking lighthouse reports, I noticed abnormally large
Potential Savings
size inminify JS
opportunity for a javascript file that is minified already.What did you expect?
I expected the lighthouse report to not list minified JS files in this
minify JS
opportunity.What have you tried?
I inspected the code of minification-estimator.js with that JS file I have encountered with this problem. Turns out that the file contained this patch of code in middle of the file:
else/VALID_REGEX_PATTERN/.test(n)?(d=(new DOMParser).parseFromString("...
When the loop hit the
/VALID_REGEX_PATTERN/
, it doesn't consider it as a regex and the subsequenttotalTokenLength
calculation is messed up.I added
else
inPUNCTUATOR_REGEX
variable in minification-estimator.js, then it worked fine.How were you running Lighthouse?
node
Lighthouse Version
11.1.0
Chrome Version
No response
Node Version
No response
OS
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: