Hi. I am new to laravel and tailwindcss via Vite.
Why does my @vite not working on live server.
In localhost, i tried npm run build, and the tailwind vite works even if i dont input "npm run dev". but when i upload the project in live hosting server, it doesnt work anymore.
here's my config
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?