alan1148
posted this
22 February 2024
Hey Support Team,
I have been reading a few questions and answers here, and I think you guys need to understand the difference between minifying and tree shaking. People are asking for both.
Tree shaking is where unused lines are removed from a js or css file. This can result in breaking things because Nicepage uses some javascript to inject css classes into the DOM, and the tree shaking products can't see this.
But minifying is nothing like that. It's just a way to shorten code into something that computers can read just fine but not so much humans. All the code is still there, but it's just reformatted. So a variable named something like "strValueFromProcess1" in a javascript file might be renamed to something like "df" which of course is not intuitive to humans but the rendering computer just does not care. This example would reduce 20 bytes to 2 bytes, for every instance of that variable name. The key is that minifying is only applied after a versioned build of a css or js file is released. So the developers at Nicepage would never have to look at minified css or js. You could add a simple checkbox that allows customers to minify css and/or js, and they would get the benefits that we are all seeking. If they have problems with their site and need help, they can just uncheck those boxes so that the css and js can be human readable again, and then they/you can debug things as normal.
This question on the forum is asking for minification, not tree shaking. Your answer that says "I cannot guarantee that everything will work properly" and "depends on the tool you choose and their minificiation algorithm..." demonstrate that you are mixing up the two concepts. It should be extremely easy for Nicepage to select an industry standard minification tool that works with nicepage.js and nicepage.css, and allow customers to benefit from that. In fact, you could probably select any minification tool and it would do just fine with no problems at all.
I am here asking for minification. Can we get that?
Hey Support Team,
I have been reading a few questions and answers here, and I think you guys need to understand the difference between minifying and tree shaking. People are asking for both.
Tree shaking is where unused lines are removed from a js or css file. This can result in breaking things because Nicepage uses some javascript to inject css classes into the DOM, and the tree shaking products can't see this.
But minifying is nothing like that. It's just a way to shorten code into something that computers can read just fine but not so much humans. All the code is still there, but it's just reformatted. So a variable named something like "strValueFromProcess1" in a javascript file might be renamed to something like "df" which of course is not intuitive to humans but the rendering computer just does not care. This example would reduce 20 bytes to 2 bytes, for every instance of that variable name. The key is that minifying is only applied after a versioned build of a css or js file is released. So the developers at Nicepage would never have to look at minified css or js. You could add a simple checkbox that allows customers to minify css and/or js, and they would get the benefits that we are all seeking. If they have problems with their site and need help, they can just uncheck those boxes so that the css and js can be human readable again, and then they/you can debug things as normal.
This question on the forum is asking for minification, not tree shaking. Your answer that says "I cannot guarantee that everything will work properly" and "depends on the tool you choose and their minificiation algorithm..." demonstrate that you are mixing up the two concepts. It should be extremely easy for Nicepage to select an industry standard minification tool that works with nicepage.js and nicepage.css, and allow customers to benefit from that. In fact, you could probably select *any* minification tool and it would do just fine with no problems at all.
I am here asking for minification. Can we get that?