I am using an HTML template with Laravel and for every page write my custom js and CSS for features.
I want to use vitejs to minify all my js and CSS files
Like any changes in the js file (filename.js) in the project-root/resources/js directory
vitejs work in the background and update the file (filename.min.js) in the project-root/public/js directory
and same for css
reference:
Take a look at
https://laravel.com/docs/9.x/vite
Once you have it setup you
npm run dev
to get updated css/js files during development
and npm run build
to generate minified files to deploy