Hey guys
So I'm trying to get tailwind in a new Laravel app and I'm either lost or it's not working.
resources/app/app.css
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
My tailwind config is as follows:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
theme: {
extend: {},
},
plugins: [],
}
and postcss config
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Then i load that in to my resources/js/app.js file
import './bootstrap';
import '../css/app.css';
So I then run npm run dev and I have tried npm run build, which then does nothing and my styles are not loading.
My vite file is:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/js/app.js',
],
refresh: true,
}),
],
});
How im using in blade
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Artists</title>
@vite('resources/js/app.js')
</head>
<body>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
</body>
</html>
Im using the latest version of Laravel, so any help would be wonderful