Skip to content

Commit

Permalink
fix: change base to / for custom domain
Browse files Browse the repository at this point in the history
  • Loading branch information
h16nning committed Jan 23, 2025
1 parent 7307593 commit 151eee0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="fff" />
<meta name="description" content="Skola is a free and open source flash card app." />
<link rel="apple-touch-icon" href="./logo.svg" />
<link rel="icon" type="image/x-icon" href="./logo.svg">
<link rel="apple-touch-icon" href="/logo.svg" />
<link rel="icon" type="image/x-icon" href="/logo.svg">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

<link rel="manifest" href="./manifest.json" />
<link rel="manifest" href="/manifest.json" />
<title>Skola</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
3 changes: 1 addition & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const root = ReactDOM.createRoot(
const router = createHashRouter(
[
{
path: "/",
element: <App />,
children: [
{
Expand Down Expand Up @@ -84,7 +83,7 @@ const router = createHashRouter(
],
},
],
{ basename: "/skola" }
{ basename: "/" }
);

root.render(
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Checker from "vite-plugin-checker";
import viteTsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
base: "/skola",
base: "/",
css: {
modules: {},
},
Expand Down

0 comments on commit 151eee0

Please sign in to comment.