30 lines
680 B
TypeScript
30 lines
680 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|||
|
|
|
||
|
|
import tailwindcss from '@tailwindcss/vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
import { defineConfig } from 'vite'
|
||
|
|
|
||
|
|
// The production build lands in ../dist, which is embedded into the Go binary.
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [vue(), tailwindcss()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
build: {
|
||
|
|
outDir: '../dist',
|
||
|
|
emptyOutDir: true,
|
||
|
|
chunkSizeWarningLimit: 900,
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
proxy: {
|
||
|
|
'/api': {
|
||
|
|
target: process.env.OPENGFW_API ?? 'http://127.0.0.1:8080',
|
||
|
|
changeOrigin: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|