Files
MoundHunters/ui/vite.config.js
2026-01-20 22:00:49 +01:00

56 lines
1.2 KiB
JavaScript

import { defineConfig } from 'vite'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
const __dirname = dirname(fileURLToPath(import.meta.url))
export default defineConfig({
plugins: [
vue(),
],
optimizeDeps: {
include: ['vue']
},
build: {
outDir: '../priv/static',
emptyOutDir: false,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
},
output: {
entryFileNames: 'app.js',
chunkFileNames: 'chunks/[name].js',
assetFileNames: 'assets/[name].[ext]'
}
}
},
resolve: {
alias: {
"@": fileURLToPath(new URL('./src', import.meta.url)),
"@stores": fileURLToPath(new URL('./src/stores', import.meta.url)),
},
},
server: {
proxy: {
'/socket': {
target: 'http://localhost:4000',
changeOrigin: true,
secure: false
},
'/api': {
target: 'http://localhost:4000',
changeOrigin: true,
secure: false
},
'/admin': {
target: 'http://localhost:4000',
changeOrigin: true,
secure: false
},
}
}
})