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

zsoltibv's avatar

Vue not working in Laravel project on production server

So i managed to deploy and link everything on the server except the Vue Components.

I ran the "npm run build" command so vue components got bundled in the build directory in the form of .js files.

Then from app.blade.php i included those .js files.

Vue components still don't show up, even though linking is correct.

In the public directory i have the following: build -> assets -> 4 .js files, one .css file and a manifest.json

I included all of them in the app.blade.php.

Anyone available to help please?

0 likes
7 replies
mvd's avatar

@zsoltibv

And after you ran npm run build Vue is working on your dev machine?

zsoltibv's avatar

@mvd

On localhost it works fine since i import the vue files directly:

@vite('resources/js/app.js')

and the css like this:

@vite('resources/css/app.css')

But on production this doesn't seem to work.

So, on production i changed up the css like this to work after running tailwind minify:

link rel="stylesheet" href="{{asset('build.css')}}"

But I cant get the Vue components working.

zsoltibv's avatar

@Sinnbeck

Thanks for the reply.

If I leave it with the @vite i get the "Vite manifest not found at: \public/build/manifest.json" even though it's there and it's telling me to run npm install && npm run dev, but I can't since I'm on production server.

Sinnbeck's avatar

@zsoltibv then you haven't build for production it seems? npm run build If you ran it locally, make sure to include that file when you send it to the server

NoshadAli's avatar

@zsoltibv If you've already run the npm run build command and built your project, follow these steps to deploy it:

Open the public folder in your project directory. Copy the build folder from the public directory. Paste the build folder into the root directory of your project on the server.

Please or to participate in this conversation.