diff --git a/vite.config.ts b/vite.config.ts index 6e94410..754b8e9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,25 +1,31 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -import { fileURLToPath, URL } from 'node:url' +import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) + '@': resolve(__dirname, 'src') + } + }, + build: { + outDir: 'dist', + sourcemap: false, + rollupOptions: { + output: { + manualChunks: { + vendor: ['vue', 'vue-router', 'pinia', 'axios'], + markdown: ['marked', 'dompurify', 'highlight.js'] + } + } } }, server: { port: 5173, proxy: { - '/api': { - target: 'http://localhost:8080', - changeOrigin: true - }, - '/uploads': { - target: 'http://localhost:8080', - changeOrigin: true - } + '/api': { target: 'http://localhost:8080', changeOrigin: true }, + '/uploads': { target: 'http://localhost:8080', changeOrigin: true } } } }) \ No newline at end of file