Currently, I build locally then push to my repo. To make this work I removed /public/build from .gitignore. However, knowing the Laravel team are much smarter than me I am sure they have this build folder in the .gitignore for a reason.
What is the best practice for building and deploying a Laravel site with vite? Should I install npm on my server and build or is it ok to handle locally and push like I am?
@jlrdw I use forge and I don't have any problems getting my Laravel sites to run, I just want to know if I should be building my production sites on my server.
@naykel There is a free series on forge. I don't use forge. But normally you pull your Github or staging to production and install the framework there among other commands.
@naykel The public/build directory is ignored from version control because you’re meant to run npm install and npm run build on your server when deploying your site.
@Snapey Thank you, I think this is what I needed to hear. It’s so easy to overthink things and find yourself stuck in a loop of doubt when you don’t fully understand something.