vue.config.js 511 B

12345678910111213141516171819202122
  1. const { defineConfig } = require("@vue/cli-service");
  2. module.exports = defineConfig({
  3. chainWebpack: (config) => {
  4. // 修改网页标题
  5. config.plugin("html").tap((args) => {
  6. args[0].title = "内置网页";
  7. return args;
  8. });
  9. },
  10. lintOnSave: false,
  11. transpileDependencies: true,
  12. devServer: {
  13. host: "localhost",
  14. port: 8088,
  15. open: true,
  16. proxy: {
  17. "/api": {
  18. target: "http://127.0.0.0:5000", // 请求代理地址用来解决跨域
  19. },
  20. },
  21. },
  22. });