You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/oafAdmin/vite.config.ts

41 lines
1005 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
host: '127.0.0.1',
port: 3000,
proxy: {
'/api': {
target: 'http://127.0.0.1:4001/',
changeOrigin: true,
ws: true,
},
'/media': {
target: 'http://127.0.0.1:4001/',
changeOrigin: true,
ws: true,
},
},
},
plugins: [vue()],
build: {
outDir: './dist/',
assetsDir: './',
rollupOptions: {
output: {
entryFileNames: `static/[name].[hash].js`,
chunkFileNames: `static/[name].[hash].js`,
assetFileNames: `static/[name].[hash].[ext]`,
},
},
},
})