vue.config.js 732 B

12345678910111213141516171819202122
  1. module.exports = {
  2. publicPath: './',
  3. outputDir: './www',
  4. assetsDir: 'static',
  5. productionSourceMap: false,
  6. lintOnSave: true,
  7. filenameHashing: true,
  8. devServer: {
  9. https: false,
  10. port: 4562
  11. // proxy: {
  12. // '/api': {
  13. // // 此处的写法,目的是为了 把上面 /api 替换成 http://127.0.0.1:3000/
  14. // // 如果使用的是自己封装的请求函数 那么你应该这样写 baseURL: '',
  15. // // 注意这里的 api 是必须的,因为是有代理的缘故
  16. // target: 'https://caner.top',
  17. // // 允许跨域
  18. // changeOrigin: true
  19. // }
  20. // }
  21. }
  22. }