Vite on production is taking assets from http despite APP_URL is set to https://.

How to resolve this in the Vite config? I can't change Laravel AppServiceProvider to force to use https because this would cause other issues.
I use @vite directive to get resources, I can change that if needed:
@vite('resources/js/app.js')
I tried vite build -- --https but this doesn't seem to work.
Adding ASSET_URL (with https) fixed the issue. It wasn't set at all in .env and Vite decided to pull through http://.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With