-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to csso (has blocker) #38
Comments
@DanielRuf just interesting - why do not migrate on cssnano? Most of developers uses Also I find the problem in this - for example I want to minify my css using Solutions - remove /cc @fabiosantoscode Ideally html minimizer should minimize only HTML and provide the developer ability to setup JS and CSS minimizer. |
This problem has existed for so long that I have already lost confidence that it will someday be solved. |
Please do not bind tools so tightly, this creates problems that may never be resolved - some tools can be deprecated, some of them abandoned, some of them have a lot of bugs. |
We can maybe make these optionalDependencies as these are optin (minimize css). Regarding cssnano, I do not know if this covers the features that we need, like a comment which prevents minification. When the users have the option to use a different css minification package, then we have to remove the parts in the documentation that mention the comments to skip / prevent it which is from clean-css - and a few more parts too including tests.
Sure but the original html-minifier used uglify-js and I guess this was a requested feature. Also people request more like #34 so they expect a certain amount of features and parts that are minified. Removing terser makes not much sense imho. Same for any css minifier. Also html-minifier is available as single standalone script and also as CLI to easily compress chunks of data. So for now we should avoid problems by removing the default minifiers.
Which exact problem?
This happens with every piece of software. |
It will be great and solve a lot of problems, maybe event Features provided minimizer can be different, some of them can be always safe, so you even don't need comments to skip / prevent minification, some of them can be even don't touch unnecessary stuff, for example I can use
The fact that the tools are so binded that we cannot change parts of them, this kills one of the important properties of programming - modularity.
And yes and no, for example We even safe 0CJS, like: function getMinifyCSS(options) {
if (typeof options.minifyCSS === 'function') {
return options.minifyCSS;
}
let minifyCSS;
try {
minifyCSS = require('clean-css')
} catch (error) {
throw new Error('Please install `clean-css` to minimize CSS');
}
return minifyCSS;
} |
It is |
And not every consumer is webpack or uses your loaders and so on ;-) Users expect that all available bundles (browser, Node and CLI) work the same. So I will not and do not plan to remove these dependencies. This makes more sense in some html-minifier-lite version (without terser and clean-css) which would be a completely different endproduct - with a different name and not under the terser org probably as there would be no terser. And this could be used by html-minifier-terser (drop in terser and clean-css / csso). I thought you wanted to fork html-minifier(-terser) and change it to your needs? |
I akso fail to see how the current discussion helps with the csso migration. Please stay on topic. Otherwise I have to lock issues. If there should be a version which does not minify css and js (which makes sense in some way), this would be a completely new package and a completely different topic. And this should be discussed in a separate issue. But this will not happen in html-minifier-terser. Also because minification of css, js and more was a requested feature by many users for a very long time and this won't change in the near future, and there is a whole ecosystem outside of the webpack world which relies on this package. Please respect that. |
still hope I can show you architectural problems that will help the whole community. But for some reason you don't want to hear me. What is the real reason for keeping them in dependencies? No extra installation? But this advantage poses more problems than it solves:
I can continue, speak - |
This is exactly what I am telling you, I did not say a word here about
Thanks for the threats, I appreciate your desire to hear someone else's opinion |
See my previous comments regarding this and csso. I might change my decision but so far csso provides what we need here. The rest is not relevant for this issue. |
Not sure if cssnano is even an option at all at this time: Oh and I see where it might come from that you want to use cssnano: https://github.com/cssnano/cssnano/releases |
@DanielRuf we use |
Unfortunately, I see your position - not to solve these architecturally problems, it's a pity. I really hoped that we could get rid of multiple same tools and focus on the one - bugs/features/docs/etc. Not wanting to listen to someone else's opinion is a bad habit in OSS, sorry for wasting your time |
I think it's best we stay with clean-css and fork / improve it. I took a closer look at the code and this should be ok and we should be able to resolve the current issues with clean-css. So no need to migrate to csso or a different solution right now. Other solutions might produce new problems (ignoring markup with a comment, different outcome and different features, ...). |
No, |
Blocker: #27 (comment)
The text was updated successfully, but these errors were encountered: