I’m trying to deploy a Laravel Livewire app to Vercel. I configured the app using this guide and managed to get the app pushed to Vercel (haven’t configured the DB yet though).
I can access the web app on the URL Vercel gave me, but the CSS and JavaScript are not downloading, although the HTML is. This means there is no styling on the page, but more importantly, the buttons and other JavaScript features don’t work, meaning the app is useless.
This is the console error:
Blocked loading mixed active content “https://my-cool-vercel-app.vercel.app/build/assets/app-D_9mj7XC.css”
Blocked loading mixed active content “https://my-cool-vercel-app.vercel.app/build/assets/app-z-Rg4TxU.js”
I’m not sure what’s going on here. Here is my vercel.json
file:
{
"version": 2,
"framework": null,
"functions": {
"api/index.php": { "runtime": "vercel-php@0.6.0" }
},
"routes": [
{
"src": "/(.*)",
"dest": "/api/index.php"
}
],
"env": {
"APP_ENV": "production",
"APP_DEBUG": "true",
"APP_URL": "https://my-cool-vercel-app.vercel.app/",
"APP_KEY": "base64:topsecretappkey123456789=",
"APP_CONFIG_CACHE": "/tmp/config.php",
"APP_EVENTS_CACHE": "/tmp/events.php",
"APP_PACKAGES_CACHE": "/tmp/packages.php",
"APP_ROUTES_CACHE": "/tmp/routes.php",
"APP_SERVICES_CACHE": "/tmp/services.php",
"VIEW_COMPILED_PATH": "/tmp",
"CACHE_DRIVER": "array",
"LOG_CHANNEL": "stderr",
"SESSION_DRIVER": "cookie"
}
}