hhmx.de

Föderation EN Di 22.10.2024 12:14:40

if you've got a load of CSS files which may have many duplicate entries, what's a good tool for bundling them all together and deduplicating them? Ideally a standalone tool which mostly does that, not something like a webpack plugin which will require me to set up webpack.

Föderation EN Di 22.10.2024 12:18:10

@sil as a fast standalone tool for bundling I tend to use esbuild. Not sure it'll do all the de-dup for you though.

Föderation EN Di 22.10.2024 12:23:37

@realms ah, this is mostly because I've got a bunch of separately build things which all come with their own independent self-contained CSS, but quite a lot of the self-contained CSS includes the same libraries into each component; this is needed when each one is used on its own! but when I use multiples, it's sadness because the library is in there multiple times. (For annoying reasons, I can't conveniently get at the components before they build.) So the dedupe is really the point.

Föderation EN Di 22.10.2024 13:00:16

@cheeaun ah, cool; never heard of that! is it any good?

Föderation EN Di 22.10.2024 14:29:59

@sil it's pretty good from what I've tested, though haven't tried on public production sites.

It'll be harder to adopt this if your existing project depends on many PostCSS plugins - Lightning does its own postcss/autoprefixer stuff