@Snapey
This works great but I have a related problem that npm run dev breaks tailwind on newly installed apps.
Created a jetstream app a week or two ago and every thing works (npm run dev, using valet and Freek's tips).
Created a new jetstream app yesterday and only npm run build (or your --watch tip) works, but with manual browser refresh., npm run dev shows the browser is being refreshed but tailwind breaks (no css).
Older package.json:
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.0",
"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.0",
"vite": "^2.9.11"
}
}
newer package.json which has been updated to latest versions:
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"watch": "vite build --watch"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.4",
"alpinejs": "^3.10.3",
"autoprefixer": "^10.4.7",
"axios": "^0.27.2",
"laravel-vite-plugin": "^0.5.2",
"lodash": "^4.17.21",
"postcss": "^8.4.14",
"tailwindcss": "^3.1.6",
"vite": "^3.0.3"
}
}
btw stopped valet to test and used serve but same result.
Are newer versions causing this? Any insight would be appreciated. Thx.