Commits
Click on a commit to change the comparison rangeperf(transformer/styled-components): simplify CSS minification (#12224)
Simplify CSS minification.
* Remove the step of adding placeholders, which means we also don't need to remove them again, and don't need a hashmap to track which quasis are retained. Instead, just work through the quasis one by one.
* Remove the intermediate `new_raws` `Vec`.
* Skip `\\`, `\'`, `\"` in byte search loop, to avoid backtracking to check for `\"` when exiting a string.
The whole thing squashes down to a single function.
I *believe* I've kept the behavior exactly as it was before. Is there anything I'm missing?
There's one bit of the logic I don't understand. `/* ... */` is replaced with a space, unless there's a space preceding / following it. But I don't think we need to add a space in cases like `height:/* big */${10000}px`. Do we?4 months ago
by overlookmotel