Replies: 1 comment
-
|
What's the issue with printing the string across multipls lines vs the same line? - As per the minifier FAQ, this is done to minimize the out size. Given the following input: Oxc minifies this to 61 bytes, and Terser minifies this to 64 bytes. Oxc's miniications is an improvement vs oxc's. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I require some further information regarding lines in strings. Vite has migrated to oxc as the minifier. However after many hours trying to figure out what is going on as the strings are compressed without minify enabled as I format them in a plugin first. Oxc does not compress lines in strings it undoes the transformation in a plugin so it reverses the transformation back to lines. Terser does so it's a breaking change to previous minifiers.
A string like
Is reversed back to
In Terser it's
Is there a known work around before forcing terser as the minifier to compress a module full of very large GLSL shader strings with lines in it ? Terser has the same speed as Oxc so not sure why they migrated to it so early so migrating to it is a breaking change. .
The documentation here provides no resolution and no reason to why it's not compressing strings or an option to. It's very strange documentation and seems unfinished.
https://oxc.rs/docs/guide/usage/minifier/faq.html#new-lines-in-strings-are-not-removed
Some information regarding the issue.
vitejs/vite#22627 (comment)
Beta Was this translation helpful? Give feedback.
All reactions