-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS Minification Warning in FluxUI During npm build #1140
Comments
@DaW-S thanks for reporting! I've just run an |
I experienced this error as well. I can't remember exactly what I did to resolve it, but I remember it being something related to the Flux upgrade guide. I remember thinking that I should've finished the upgrade guide first before trying to do the whole I'm not 100% sure at this point, but I think it was because I hadn't renamed @fluxStyles to @fluxAppearance yet on my project. Hope this helps, my general advice is to run through the whole upgrade guide before trying to compile your assets. |
I'm not using dark mode in my app so I deleted @fluxStyles and I'm not using @fluxAppearance at all. Here is my Vite config import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
refresh: true,
}),
],
}); Btw I've just noticed another think. When I don't have Like I said I don't have @fluxAppearance in my layout template. But even with @custom-variant dark (&:where(.dark, .dark *)); in app.css and @fluxAppearance I'm still getting the same error during build. Thanks for your help. |
One more thing that came to mind as I was troubleshooting an HMR issue. Double-check your NPM dependencies if they are on the correct version. I do remember doing an Long shot, but may have been one of the things that eventually resolved this problem for me indirectly. |
@DaW-S Tailwind by default uses media queries to detect your system theme, so either need to:
Flux's dark mode depends on Tailwind's dark mode CSS selectors, hence why we need Hope that makes sense. Re the minification issue, your Vite config looks fine. It might be worth changing over to Tailwind's Vite plugin though (I'm guessing you're still using PostCSS), as it might fix the issue. See here for details https://tailwindcss.com/docs/installation/framework-guides/laravel/vite You will need to remove your Can you see if that fixes the issue and let us know? |
Flux version
v2.0.1
Livewire version
v3.5.20
Tailwind version
v4.0.7
What is the problem?
Hey folks,
After upgrade to Flux version 2 I'm getting warning when I run npm run build.
How do you expect it to work?
Before upgrade to Tailwind 4 and Flux 2 did not get this warnings.
Please confirm (incomplete submissions will not be addressed)
The text was updated successfully, but these errors were encountered: