52 lines
1.1 KiB
TypeScript
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']
|
|
}
|
|
}
|
|
})
|