const { defineConfig } = require("@vue/cli-service");
const { BASE_URL } = require("./src/config");
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  publicPath: BASE_URL,
  devServer: {
    port: 8080,
    open: true, // vue项目启动时自动打开浏览器
    proxy: {
      "/api": {
        target: "https://flowise.tsl3060.com",
        changeOrigin: true, //是否跨域
        logLevel: "debug",
        bypass: function (req, res, proxyOptions) {
          console.log(proxyOptions.target + req.url, req);
        },
        pathRewrite: {
          // "^/api": "",
        },
      },
    },
  },
});
