1
0

vite.config.js 700 B

12345678910111213141516171819202122232425262728293031
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import path from 'path'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. resolve: {
  7. alias: {
  8. '@': path.resolve(__dirname, 'src'),
  9. },
  10. },
  11. server: {
  12. port: 5173,
  13. // 开发服启动后预转换常用页面,首次打开/切换更快
  14. warmup: {
  15. clientFiles: [
  16. './src/views/Dashboard.vue',
  17. './src/views/StockAnalysis.vue',
  18. './src/views/StockScreener.vue',
  19. './src/views/NewsCenter.vue',
  20. './src/views/Simulation.vue',
  21. ],
  22. },
  23. proxy: {
  24. '/api': {
  25. target: 'http://localhost:8000',
  26. changeOrigin: true,
  27. },
  28. },
  29. },
  30. })