Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dvdfreitas's avatar

Vite build not uploaded on github

Hi,

Is there a security reason why vite build, and other builds, are not added in a github project? Is it ok to force adding the build to git? If so, how can I do it? The reason I'm asking this is that running "npm run build" on the server fails (I use a shared hosting). And I don't want to upload manually the files.

Thanks for the help.

0 likes
2 replies
thinkverse's avatar
Level 15

Not really a security issue since the files are publicly available if you do npm run build on the server.

It's more the current standard to build it on the server or let CI/CD take care of it for you. But if you don't have the capability to do that, like on shared hosting for example, then the best option is to remove the /public/build from your .gitignore and start tracking the changes and commit in the builds.

2 likes

Please or to participate in this conversation.