build: 将基础路径从相对路径改为绝对路径

修改vite配置中的base选项,从'./'改为'/',以使用绝对路径作为项目基础路径
This commit is contained in:
史悦
2026-02-04 17:15:02 +08:00
parent eee40fa071
commit fee9f3db15

View File

@@ -5,7 +5,7 @@ import path from 'path'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
base: './', base: '/',
resolve: { resolve: {
alias: { alias: {
'@': path.resolve(__dirname, './src'), '@': path.resolve(__dirname, './src'),