vuejs-tailwindcss-portfolio
vuejs-tailwindcss-portfolio copied to clipboard
The app breaks 404 when switching colors
When deployed to Netlify try to navigate to any subpage and change the viewing mode Dark/Light and notice how the page breaks ...
Seems like that's an issue with the Netlify itself. BTW, I have started a fix for this and will be using a different method for switching colors. It should not reload the page.
This project is using createWebHistory mode in vue router which is recommended by vue router. This issue will raise when you will reload any page rather than the home page. To fix this issue you have to configure your server. Please check the link below https://router.vuejs.org/guide/essentials/history-mode.html
In your .htaccess add the following to fix that issue.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Thank you @abd-abdullah for your contributions.