WGDashboard/src/static/client/vite.config.js

34 lines
608 B
JavaScript
Raw Normal View History

2025-05-29 16:23:20 +08:00
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
2025-05-31 22:59:46 +08:00
import {proxy} from "./proxy.js";
2025-05-29 16:23:20 +08:00
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
2025-05-31 22:59:46 +08:00
{
name: 'rename',
enforce: 'post',
generateBundle(options, bundle) {
bundle['index.html'].fileName = "client.html"
}
}
2025-05-29 16:23:20 +08:00
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
2025-05-31 20:52:53 +08:00
},
2025-05-31 22:59:46 +08:00
server:{
proxy: {
'/client': proxy,
2025-05-31 22:59:46 +08:00
},
host: '0.0.0.0'
},
2025-05-31 20:52:53 +08:00
base: '/static/client/dist'
2025-05-29 16:23:20 +08:00
})