when I use vite build
, and use python3 -m http.server
it run successfully.
but deploy to Github Page (Project site), it fails to solve absolute path.
<script type="module" crossorigin src="/assets/index-BbwXgWnI.js"></script>
when I use vite build
, and use python3 -m http.server
it run successfully.
but deploy to Github Page (Project site), it fails to solve absolute path.
<script type="module" crossorigin src="/assets/index-BbwXgWnI.js"></script>
I found a solution for this use relative path
- <script type="module" crossorigin src="/assets/index-BbwXgWnI.js"></script>
- <link rel="stylesheet" crossorigin href="/assets/index-D9dz9LQE.css">
+ <script type="module" crossorigin src="assets/index-BbwXgWnI.js"></script>
+ <link rel="stylesheet" crossorigin href="assets/index-D9dz9LQE.css">
here is a similar question github pages and relative paths, but I think this question is out of date. Github Page can solve relative paths successfully. without any additional configuration.