mi-assessment/server/MiAssessment/src/MiAssessment.Admin/admin-web/vite.config.ts
2026-03-17 10:45:51 +08:00

52 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import { fileURLToPath } from 'url'
const __dirname = fileURLToPath(new URL('.', import.meta.url))
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
build: {
outDir: '../wwwroot',
emptyOutDir: true,
rollupOptions: {
input: resolve(__dirname, 'index.html')
}
},
server: {
proxy: {
'/api': {
target: 'http://localhost:61551',
changeOrigin: true
},
'/report': {
target: 'http://localhost:5238',
changeOrigin: true
},
'/css': {
target: 'http://localhost:5238',
changeOrigin: true
},
'/images': {
target: 'http://localhost:5238',
changeOrigin: true
}
}
},
test: {
globals: true,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,ts}'],
coverage: {
reporter: ['text', 'json', 'html']
}
}
})