Update asset paths to use relative URLs (#129)

This commit is contained in:
samanhappy
2025-05-27 11:55:50 +08:00
committed by GitHub
parent edfbdb7123
commit c3e1fa1eee
4 changed files with 8 additions and 4 deletions

View File

@@ -1,13 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MCP Hub Dashboard</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
</head>
<body class="bg-gray-100">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="./src/main.tsx"></script>
</body>
</html>

View File

@@ -32,7 +32,7 @@ const SponsorDialog: React.FC<SponsorDialogProps> = ({ open, onOpenChange }) =>
<div className="flex flex-col items-center justify-center py-4">
{i18n.language === 'zh' ? (
<img
src="/assets/reward.png"
src="./assets/reward.png"
alt={t('sponsor.rewardAlt')}
className="max-w-full h-auto"
style={{ maxHeight: '400px' }}

View File

@@ -31,7 +31,7 @@ const WeChatDialog: React.FC<WeChatDialogProps> = ({ open, onOpenChange }) => {
<div className="flex flex-col items-center justify-center py-4">
<img
src="/assets/wexin.png"
src="./assets/wexin.png"
alt={t('wechat.qrCodeAlt')}
className="max-w-full h-auto"
style={{ maxHeight: '400px' }}

View File

@@ -10,6 +10,7 @@ const packageJson = JSON.parse(readFileSync(path.resolve(__dirname, '../package.
// https://vitejs.dev/config/
export default defineConfig({
base: './', // Use relative paths for assets
plugins: [react(), tailwindcss()],
resolve: {
alias: {