I wanted to deploy my Laravel and Vue SPA. I got the Laravel part to work as expected, but the Vue components which are used by vue router are not rendering. I tried different htaccess setups because I think it might be a path issue or the server not finding the files etc.
I tried adding different htaccess configurations and tried to modify my import paths. I also tried to add .default to the requirements but that didnt work either
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /public
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>
import QuestionView from "./components/Question.vue";
Vue.component("question-component", require("./components/Question.vue"));
If I turn on development mode on the server it shows me that the component couldnt be rendered or mounted
I hope someone can help me find the cause of this problem.
Aucun commentaire:
Enregistrer un commentaire