Hi everyone,
I have a Laravel 12 project running on an Ubuntu VPS (no Docker) with PHP 8.4 and npm 11.4.2. The web service was working fine.
Recently, I made some changes to the frontend views (new UI adjustments). After that, I ran:
npm run build
on the server.
vite.config.js config
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [resources/views/**/*],
}),
tailwindcss(),
],
server: {
cors: true,
},
});
Issue:
After building, the UI on the website looks wrong — everything appears large and not user-friendly anymore.
What I’ve tried:
Cleared Laravel cache:
php artisan config:clear
php artisan view:clear
php artisan cache:clear
Cleared browser cache
Restarted server
Flushed cache at domain provider/CDN side
Still seeing the same issue.
Could someone suggest what else might be causing this?
Wrong build path or asset link?
Cache issue somewhere else?
Build config problem?
Any ideas or suggestions would be appreciated. Thanks!