Yes, that's normal, they are configuration files and should live in the root. 👍
Is it normal that tailwind.config.js, vite.config.js are in root folder of Laravel 9?
Fresh install of Vite and Tailwind results in tailwind.config.js, postcss.config.js and vite.config.js in the root folder of Laravel 9.
Is this expected? I want to organize these file into the existing resources/js folder. Where do I update references to these files to avoid breaking things?
That's for Laravel's configuration. vite.config.js is the main configuration for Vite, the assets bundler Laravel uses. postcss.config.js is used by PostCSS to configure plugins, such as Tailwind CSS. tailwind.config.js is used to configure your Tailwind CSS, like custom colors, font families, plugins, themes, and more.
Laravel doesn't handle asset bundling itself - and when I say assets I'm talking JavaScript and CSS, so it uses Vite instead for that. And Vite looks in the root of the project folder for the config file by default, as does PostCSS and Tailwind CSS.
By default, Tailwind will look for an optional tailwind.config.js file at the root of your project where you can define any customizations.
Please or to participate in this conversation.