Have you done this before sending the code to the live server ?
npm run build
And you need to add the build folder when you push the code.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi. I need help. I have a laravel project and i install tailwindcss with vite. why does my @vite not working on live server. and when i tried it on localhost, i need to open terminal and type "npm run dev" before the vite works.
here's my configuration.
vite.config.js
import { defineConfig } from 'vite';
import tailwindcss from "tailwindcss";
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
tailwindcss(),
],
build: {
chunkSizeWarningLimit: 1600,
},
});
in my app.blade.php i just insert
@vite(['resources/css/app.css', 'resources/js/app.js'])
for my @vite to work, i need to open a terminal in my localhost and then npm run dev. but in live server, do i need to npm run dev as well and install npm or something i need for npm to work?
Please or to participate in this conversation.