Replies: 3 comments 3 replies
-
Remove minification altogetherMinification of web assets is less relevant these days since most HTTP servers include The advantage from I think we could remove the minification from Franklin altogether, which would:
Small assetsA second argument here is that (I would image that) the files that Franklin generates are often quite small to start with. People who use Franklin.jl don't write huge CSS and JS codebases, which is where minifcation/bunlding would make the greatest difference. This means that the performance bottleneck is not asset size (i.e. longer download time), but the overhead of DNS/HTTP (i.e. longer time-to-first-byte). This is unaffected by minification. |
Beta Was this translation helpful? Give feedback.
-
Use a modern bundlerNowadays, 'minifying' has grown out to a broader domain: bundling. Besides minification, it can apply more advanced optimizations, like combining multiple assets into one, to reduce the number of requests. For example, we could use parcel, a new, hip & trendy web bundler that is designed to work well for browser-targeting projects (like franklin) with minimal setup. I think we could remove the minification from Franklin altogether, which would:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the careful suggestions and write up!! Parcel looks very impressive; thanks for the pointer, this is something to investigate for sure (even if just as a "here's a recommended step you can do for yourself"). Wrt Franklin I think we're broadly on the same page: the plan is to drop the dependency which also drops the Python dep and will reduce headache; then suggest people can use dedicated tools (such as Parcel or PurgeCSS or the GitHub image optimiser etc). |
Beta Was this translation helpful? Give feedback.
-
I noticed some problems with the optimization built into Franklin, and I had to disable it. Looking around the issues, it seems like minification issues are happening to other people as well, which means that our minifcation solution is incorrect: it contains bugs that change the behaviour of the page, which a correct minifier should never do.
The minifier that we use (https://github.com/juancarlospaco/css-html-js-minify) does not look like a heavy-duty, well-tested library, and it is no longer being maintained. I have some ideas!
Beta Was this translation helpful? Give feedback.
All reactions