Open JayPanoz opened 3 months ago
my take: let consumers of ReadiumCSS do it themselves. Nowadays I would use LightningCSS anyway, not PostCSS
I don't have an opinion on this. We rarely need to debug CSS in the mobile toolkits but minifying it is probably not critical in a local context.
It might be more useful for the Web toolkit? (cc @chocolatkey).
I agree with @danielweck - users of this project should take care of the minfication themselves. We shouldn't burden ourselves with being responsible for this, as there are two many possibilities to take into account. Would we include a sourcemap in the minified bundle? What format would the sourcemap be (inline, external, if external, what name)? In the case of the ts-toolkit, the minification is done by whatever bundler is used in the implementer's project, and it works out fine. @mickael-menu you're right that for local context, minifying doesn't makes sense in terms of file size, but there is the potential for reduction in parsing time to consider.
The bundles should definitely still be made in my opinion, they are very helpful.
The bundles should definitely still be made in my opinion, they are very helpful.
Yep, I agree.
I'm submitting a topic for discussion.
Short description of the issue/suggestion:
When upgrading dev dependencies locally, I had to replace the PostCSS plugin for minification,
postcss-clean
, as it basically broke and errored the build process.It wasn’t hard to find another one but, given times have changed and we’re now seeing people advise to even distribute sourcemaps so that it can be easier to debug, I’m wondering whether we should even minify the dist stylesheets in the first place and just let users do it on their own if they see it necessary.