Spaces:
Sleeping
Sleeping
| import { defineConfig } from 'vite' | |
| import vue from '@vitejs/plugin-vue' | |
| import { resolve } from 'path' | |
| export default defineConfig({ | |
| plugins: [vue()], | |
| resolve: { | |
| alias: { | |
| '@': resolve(__dirname, 'src'), | |
| '@components': resolve(__dirname, 'src/components'), | |
| '@composables': resolve(__dirname, 'src/composables'), | |
| '@stores': resolve(__dirname, 'src/stores'), | |
| '@utils': resolve(__dirname, 'src/utils'), | |
| '@styles': resolve(__dirname, 'src/styles'), | |
| '@types': resolve(__dirname, 'src/types') | |
| } | |
| }, | |
| server: { | |
| port: 8080, | |
| host: '0.0.0.0', | |
| proxy: { | |
| '/api': { | |
| target: 'http://localhost:8000', | |
| changeOrigin: true, | |
| secure: false | |
| }, | |
| '/ws': { | |
| target: 'ws://localhost:8000', | |
| ws: true, | |
| changeOrigin: true | |
| } | |
| } | |
| }, | |
| build: { | |
| outDir: '../dist/frontend', | |
| sourcemap: true, | |
| minify: 'esbuild', | |
| target: 'esnext', | |
| rollupOptions: { | |
| output: { | |
| manualChunks: { | |
| 'vendor': ['vue', 'vue-router', 'pinia'], | |
| 'ui': ['lucide-vue-next'], | |
| 'charts': ['chart.js', 'vue-chartjs'] | |
| } | |
| } | |
| } | |
| }, | |
| css: { | |
| preprocessorOptions: { | |
| scss: { | |
| additionalData: `@import "@styles/variables.scss"; @import "@styles/mixins.scss";` | |
| } | |
| } | |
| } | |
| }) |