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

45 lines
876 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-08-17 16:33:03 +08:00
build: {
target: "es2022",
outDir: '../dist/WGDashboardClient',
rollupOptions: {
output: {
entryFileNames: `assets/[name]-[hash].js`,
chunkFileNames: `assets/[name]-[hash].js`,
assetFileNames: `assets/[name]-[hash].[ext]`
}
}
},
base: '/static/dist/WGDashboardClient'
2025-05-29 16:23:20 +08:00
})