尝试修复路径问题

This commit is contained in:
York 2025-02-20 14:21:01 +08:00
parent ab4f8b811e
commit 9f5abd8ffb
2 changed files with 9 additions and 29 deletions

View File

@ -5,32 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build && cp dist/index.html dist/404.html",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^6.4.5",
"@mui/material": "^6.4.5",
"@types/uuid": "^10.0.0",
"chart.js": "^4.4.7",
"react": "^19.0.0",
"react-chartjs-2": "^5.3.0",
"react-dom": "^19.0.0",
"typescript": "~5.7.2",
"uuid": "^11.0.5"
},
"devDependencies": {
"@eslint/js": "^9.19.0",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"typescript-eslint": "^8.22.0",
"vite": "^6.1.0"
}
}

View File

@ -3,11 +3,16 @@ import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
base: './', // 修改这里
base: '', // 修改这里
build: {
outDir: 'dist',
assetsDir: 'assets',
sourcemap: true, // 添加这行以便调试
minify: true
sourcemap: false,
minify: true,
rollupOptions: {
output: {
manualChunks: undefined
}
}
}
})