I tried the exact same steps in Ubuntu 22.04 using PHP 8.1 and Node.JS 20 and all works well. Maybe is only a Windows problem?.
Apr 3, 2024
5
Level 1
Vite not compiling assets (npm run build works)
I started a brand new project with Laravel 11 and I'm unable to get Vite working. Build works as expected but dev mode doesn't compile assets, causing app.css to output the @tailwind directives and app.js to import the bootstrap file that causes a 404 error.
I'm using he following config:
- Windows 11
- PHP 8.2
- Node.JS 20
I tried many many things without luck:
- Laravel 11 with and without Breeze
- Laravel 10 with and without Breeze
- Vite using ESM
- Tens of changes to
vite.config.js
I'm using the files provided by Breeze or Tailwind guide without changes, and serving the Laravel project using artisan serve.
There are more people affected but without solution. Anyone knows what's the problem here?
Thanks!
Level 1
Seems to be a Vite problem: https://github.com/vitejs/vite/issues/16176#issuecomment-2042998785
Please or to participate in this conversation.