vite.config.ts 638 B

1234567891011121314151617181920212223242526272829303132
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import { resolve } from 'path'
  4. // https://vite.dev/config/
  5. export default defineConfig({
  6. plugins: [vue()],
  7. resolve: {
  8. alias: {
  9. '@': resolve(__dirname, 'src'),
  10. },
  11. },
  12. server: {
  13. port: 5175,
  14. },
  15. build: {
  16. rollupOptions: {
  17. output: {
  18. manualChunks: {
  19. vendor: ['vue', 'vue-router', 'pinia'],
  20. element: ['element-plus'],
  21. echarts: ['echarts'],
  22. swiper: ['swiper'],
  23. axios: ['axios'],
  24. marked: ['marked'],
  25. },
  26. },
  27. },
  28. chunkSizeWarningLimit: 200,
  29. },
  30. })