Files
social-media/frontend/vite.config.js
Jonathan Bourdon b6eb692c27
Some checks failed
Backend CI/CD / build_and_deploy (push) Has been cancelled
Frontend CI/CD / build_and_deploy (push) Has been cancelled
chore: moving towards agentic development
2026-04-24 21:12:26 -04:00

63 lines
1.6 KiB
JavaScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { resolve } from 'path'
import { visualizer } from 'rollup-plugin-visualizer'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
visualizer({
filename: './dist/stats.html',
open: true, // Automatically opens in browser
gzipSize: true,
brotliSize: true,
}),
vue(),
VueI18nPlugin({
include: resolve(__dirname, 'src/locales/**')
})
],
server: {
port: 5173, // Ensure this matches your WebStorm debug URL
open: false,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:5080',
changeOrigin: true,
},
'/health': {
target: 'http://localhost:5080',
changeOrigin: true,
},
},
},
build: {
sourcemap: true, // Enable source maps for debugging
rollupOptions: {
output: {
manualChunks: {
vue: ['vue'],
vuetify: ['vuetify'],
vendor: ['lodash', 'axios'], // adjust based on your deps
vuedraggable: ['vuedraggable']
},
format: 'es',
entryFileNames: '[name].[hash].js',
chunkFileNames: '[name].[hash].js',
assetFileNames: '[name].[hash].[ext]'
}
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
json: {
stringify: false
}
})