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

Tanzirul Huda's avatar

Laravel Vue js Deploy on server

I want to deploy my laravel vue website on server and update it regularly. But after run npm run prod, when it build only a js file. How can I update my code after deploying it on server?

0 likes
6 replies
Sinnbeck's avatar

How are you currently updating it? Ftp? Git?

Sinnbeck's avatar

@Tanzirul Huda You can compile the code on the production server, but if you do I recommend doing zero downtime deployments on the production serfver.

Or you can just compile it locally and push it with the code.

Or if you are more advanced, you can compile it as part of the build-steps on github or similar before deployment

1 like
Tanzirul Huda's avatar

@Sinnbeck But if I compile my vue js code then how can I update my code next time as it will be compiled in on js file

Sinnbeck's avatar

@Tanzirul Huda What do you mean? Do you mean the files arent tracked by git or?

1 like
Tanzirul Huda's avatar

@Sinnbeck Sorry for the misunderstanding! Would you kindly please tell me can I deploy my code without compiling my vue js? If not, how can I compile it as it will be compiled in one js file?

Please or to participate in this conversation.