May 28, 2025
0
Level 4
Excluding directory in Vite/Tailwind 4
Hello,
I use Tailwind 4 with Vite in my Laravel 12 project. My vite.config.js is:
@import "tailwindcss";
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@source not "../view/admin";
@theme {
--font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
}
the line - according to Tailwind 4 documentation - that I use to exclude /view/admin is
@source not "../view/admin";
But unfortunately it looks like that Tailwind is produced css code based on /view/admin.
Is my approach correct?
Thanks, Simon
Please or to participate in this conversation.