尝试修复路径问题
This commit is contained in:
parent
ab4f8b811e
commit
9f5abd8ffb
27
package.json
27
package.json
@ -5,32 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build && cp dist/index.html dist/404.html",
|
||||||
"preview": "vite preview"
|
"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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,16 @@ import react from '@vitejs/plugin-react'
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
base: './', // 修改这里
|
base: '', // 修改这里
|
||||||
build: {
|
build: {
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
assetsDir: 'assets',
|
assetsDir: 'assets',
|
||||||
sourcemap: true, // 添加这行以便调试
|
sourcemap: false,
|
||||||
minify: true
|
minify: true,
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
manualChunks: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user