Automate bundle size report in docsite
not so bad manually compressing and updating values, but would be sweet to automate the lib sizes and feed them into a build system
This also relates to my questions on Discord. It sounds like purging is not on the horizon, yah? I think docs on a recommended approach for crusty folks like myself that want to avoid importing absolutely everything would be great too.
One idea and maybe it's what you already have in mind...it would be interesting to have an entry point config file where you have every .js def file commented out (or the other way around), and one can simply elect to use or not use whichever one is preferred.
For example, I'd like to try OP in an existing app but I'm on the fence. So, I configure it to only use the spacing custom properties with the goal to additively use more OP stuff if I like it.
purging if offloaded to purgecss as part of a production build. i dont have that documented on the site no, it's also not that reliable. if you're worried about overshipping props, consider the postcss-jit-props plugin which additively puts the props into your stylesheet when used, or only import the groups of props you want (colors, sizes, etc).
this partically issue #25 is about automating the bundle sizes tho, not about how to reduce bundle sizes in your own builds.
@argyleink Don't know if this is what you're after, but I wrote a little script that checks the current size of the built props.<thing>.css files in src. It shows the current file size and also the brotli and gzip sizes. I imagine we could export to .json for the docsite, but could also be useful if added to the release changelog.
Here is an example of the output
nice, that data as json would be great. i could tuck it into an npm script then use the data with vite to populate the sizes. i dont have any time to do it right now, but just having that script in package.json would be nice.