-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add minification for CSS and JS files #2728
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
base: master
Are you sure you want to change the base?
Conversation
9908e02
to
870038b
Compare
I added comparisons as well in the first comment. |
Thanks! I had a few questions:
|
Indeed, it's just to remove unneeded characters (so mostly whitespace) and comments (while keeping the license). Anything more advanced would require a full JS parser, which I plan to add "some day".
Never used source map so I can't answer this. If you used source maps, do you think it would be worthwhile to have them?
I suppose we could. First we need to check if some files are always on the same pages. In this case, we can merge their source code directly. However if some files are not always on the same pages, then either we generate different CSS files which include some CSS files. If there is a possibility here, it would reduce the number of files, so I think it'd be a very good thing to do.
There isn't currently but we can definitely add an option to not run minimization (although, since we have the "pretty format" feature in all web browsers, it's mostly ok imo). Gonna add it in this PR then. |
e7541ca
to
1ffa0a2
Compare
1ffa0a2
to
3ef1c65
Compare
I added |
Here are the file size differences: