Difficulty to get my CSS on a prod site with Vite #696
GuyVerville
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
On my local site https://orbiscantus.test, I have a normal installation of Vite which produces my CSS perfectly and is placed in public/build/assets as it should be. This is really the default installation for any Laravel site. When I push the code onto my production site, no CSS is read. I inspect the page and see that Vite always refers to https://orbiscantus.test in the CSS path! Nothing in my configuration is hard-coded in this regard. I don't understand how to get rid of this.
As an alternative, I force you to produce a file with no variable name.
and I hard-code this path for https://orbiscantus.com in layout.blade.php
<link rel="stylesheet" href="{{ asset('build/app.css') }}">
It's not ideal, however. It seems that Vite and Herd are working together on a security certificate... I use Laravel Forge to push my code into production.
Beta Was this translation helpful? Give feedback.
All reactions