[Vuejs]-How To Make Vue 2.7 On Vite Handle Second Sub Folder On Refresh Rather Than Throwing 404?

0๐Ÿ‘

โœ…

Iโ€™ve solved it by fixing paths in the index.html file by adding a slash before the path to indicate to load files from the root URL:

Before:

<script type="module" src="src/main.ts"></script>

After:

<script type="module" src="/src/main.ts"></script>

The same goes for other paths in index.html.

Leave a comment