vue.config.js 509 B

1234567891011121314151617181920212223242526
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. lintOnSave: false,
  5. // 公共路径配置为绝对路径,确保从根路径加载静态资源
  6. publicPath: '/',
  7. // 输出目录
  8. outputDir: 'dist',
  9. // 静态资源目录
  10. assetsDir: 'static',
  11. devServer: {
  12. port: 7627,
  13. // 开发环境代理后端API
  14. proxy: {
  15. '/api': {
  16. target: 'http://localhost:7626',
  17. changeOrigin: true
  18. }
  19. }
  20. }
  21. })