I am coming back to Laravel development after long time. While reading about Vite configuration, I got confused with 2 config file options.
In laravel documentation, it is suggested to use vite.config.js for all configuration set up. While on laravel-vite.innocenzi.dev site they refer to config/vite.php file.
The innocenzi/laravel-vite package is a 3rd party package that was the most popular way to use Laravel with Vite before the official one was released last week.
I think most people are now going to use the official plugin, as it is the default within new Laravel projects. In this case, your config would go in vite.config.js.
@drehimself Thank you very much. I was not following the recent development. So landed in this confusion.
One follow up question:
there is no information about output directory configuration inside vite.config.js. By default it output in public/build/ directory I guess. Is it possible to set output directoy? Like public/dist/ ?
Edit: This will build it in the folder specified but it won't work when trying to run the Laravel app. I guess it's looking for the public/build folder. I'm not sure if there's a way to configure this to work with Laravel.