-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Replaced jekyll-minifier that uses uglifier by terser #2571
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: George Araujo <[email protected]>
@CheariX can you test if this change fixes your issue with ES6? |
Signed-off-by: George Araujo <[email protected]>
Note that Actually, PRing |
@JoJoDeveloping you are right, so we can't get rid of I made a PR for jekyll-terser with my code, but you are right. I wll send a PR for |
Signed-off-by: George Araujo <[email protected]>
I made a PR for both jekyll-minifier and jekyll-terser. If the second one is accepted, we can drop the plugin I created and use |
Thank you @george-gca for taking care of this issue! When I wrote it initially, I was not aware that al-folio does not use I hope that your upstream PRs get merged soon. Anyways, I tested this PR and it worked flawlessly on my site. I vote for merging this PR into I also checked some of the minified JavaScript code. Looks pretty good (as far as minimized code can look "good") Using this PR, I can finally deploy my website again 😀 |
I was about to ask you this, so the minified js is looking right. Is this also true for the css and html files? And what about when jekyll env is production? |
|
I thought about adding minification only on production environments, but decided not to since using it on develop environments helped me get it right. Maybe it is a good idea to add a new param somehow to let the user specify if it should run only on production or not, and by default do this.
Thanks for the lookup. I think I will handle these guys next in this PR. I will only push it forward when the minification is as close as possible to the one with uglifier. |
For me, minifying takes quite a long time, on the order of several tens of seconds in addition to the rest. It makes the build much slower, and therefore I'm happy I don't have to deal with it when developing/prototyping. So please leave the option to have it |
Another possibility is to migrate the solution to npm-based like already done with |
I'd second this. Minifying takes some time, so I would like to skip this step in development. Also, I find the non-minified code quite nice for feature development.
I also thought about alternatives to |
Perhaps we should do performance testing between the various alternatives? |
Tbh I am not really concerned about performance here, since this will only run on production environment. I am worried about maintainability, both of our code and the ones we are depending on. For instance, jekyll-minifier last code update was 4 years ago, and it uses under the hood 4 packages: uglifier for js (last updated 4 years ago, though UglifyJS is heavily maintained), CSSminify (last updated 4 years ago), Htmlcompressor (last updated 7 years ago), and JSON::Minify (last updated 8 years ago). I am not saying that all these should be continuously updated (since JSON, for instance, is a well-defined standard), but looking at code that haven't seem an update in a while gives a certain insecurity. Meanwhile html-minifier-terser was updated last year. Maybe it is a good moment to migrate to other solution for code minification. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale. |
Hopefully fixes #2548.