build: 将基础路径从相对路径改为绝对路径
修改vite配置中的base选项,从'./'改为'/',以使用绝对路径作为项目基础路径
This commit is contained in:
@@ -5,7 +5,7 @@ import path from 'path'
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: './',
|
||||
base: '/',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
|
||||
Reference in New Issue
Block a user