With rolldown-vite, use lightningcss config from vite config and/or default optimize to false #19530
wimbarelds
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Rolldown-vite, the default value for
viteConfig.build.cssMinifyis'lightningcss', ie: the same as tailwindcss v4.As I understand it, there's no reason for both tailwindcss and vite to both minify the CSS using lightningcss; but if there is a good reason for both to do this it would be helpful if tailwindcss could adopt the lightningcss config from
viteConfig.css.lightningcss.Context:
I was having an issue with some bleeding edge CSS (namely custom css
@functionand@property) logging unknown-at-rule warnings. I configuredviteConfig.css.lightningcss.customAtRules, but only half the warnings disappeared. The warnings coming from tailwind's vite plugin "optimize" were still coming through (since tailwindcss does not adopt vite's config for lightningcss). I ended up running the tailwind viteplugin with optimize=falsetailwindcss({ optimize: false })to get rid of all the warnings. I worried this would increase the bundle size, but it did not (it got about 1% smaller), I assume the bundle did not get bigger because the minify from vite's lightningcss was still being applied.Beta Was this translation helpful? Give feedback.
All reactions