Do you have the @vite() helper in your layout file?
Vite and Tailwindcss
New install, Laravel is now using Vite instead of mix. I am open to new things so I am trying it. I have to run npm run build instead of npm run dev on my test server and it worked yesterday. for this install, I see both a .js and a .css file appearing in the public/resources/build/assets folder, but for some reason, when I view source code, the reference to both is missing on my Laravel app. followed all the instructions, missing something. this is what the package.json looks like now
the main question is - how to make sure the files get pointed to correctly....
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"alpinejs": "^3.0.6",
"autoprefixer": "^10.4.7",
"axios": "^0.25",
"laravel-vite-plugin": "^0.2.1",
"lodash": "^4.17.19",
"postcss": "^8.4.14",
"tailwindcss": "^3.1.4",
"vite": "^2.9.11"
},
"dependencies": {
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.0"
}
}
and here is what the tailwinds config looks like
module.exports = {
content: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
],
theme: {
extend: {
fontFamily: {
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/aspect-ratio'),
],
};```
and the vite config
```import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'resources/css/app.css',
'resources/js/app.js',
]),
],
});```
Please or to participate in this conversation.