Level 1
solved, the error was that I had preflight in the tailwind config.
corePlugins: {
preflight: false,
},
I have configured Vite in my Laravel project, however viewing the page, it shows as broken, this is my configuration: ** 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,
}),
],
});
postcss
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
tailwind.config.js
module.exports = {
content: [
'./resources/views/front/**/*.blade.php',
'./resources/views/errors/**/*.blade.php',
'./resources/views/livewire/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./node_modules/flowbite/**/*.js'
],
app.css
@config "../../tailwind.config.js";
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
[...]
}
output
✓ 97 modules transformed.
public/build/manifest.json 0.26 kB │ gzip: 0.13 kB
public/build/assets/app-0298161a.css 195.05 kB │ gzip: 26.60 kB
public/build/assets/app-c3e5fbb7.js 191.30 kB │ gzip: 59.52 kB
✓ built in 5.85s
it seems that it does not execute tailwind
if in my main, I use tailwind cdn, he executes the template correctly...
<script src="https://cdn.tailwindcss.com"></script>
solved, the error was that I had preflight in the tailwind config.
corePlugins: {
preflight: false,
},
Please or to participate in this conversation.