0

hello everyone I deployed laravel project on vercel but as you see the style does not work

I have an error when deploying the laravel project on vercel the style does not work I followed this site https://calebporzio.com/easy-free-serverless-laravel-with-vercel and I saw tutorials on youtube but it doesn't work

the project works normally locally but as you see on vercel the style does not work I don't know where the problem is I followed the tutorial that I shared and also videos on youtube but nothing

1 Answer 1

0

Check vercel configuration. Make sure the paths in vercel.json file. Below is an example of vercel.json

{
    "version": 2,
    "public": "public",
    "rewrites": [
        { "source": "/js/(.*)", "destination": "/public/js/$1" },
        { "source": "/css/(.*)", "destination": "/public/css/$1" },
        { "source": "/images/(.*)", "destination": "/public/images/$1" },
        { "source": "/(.*)", "destination": "/index.php" }
    ]
}

Additionally, run the following commands to clear cache

php artisan cache:clear
php artisan view:clear
php artisan config:clear

Not the answer you're looking for? Browse other questions tagged or ask your own question.