const { defineConfig } = require("@vue/cli-service");
const path = require("path");
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      alias: {
        "@": path.resolve(__dirname, "src"),
      },
    },
  },
  devServer: {
    proxy: {
      "/file": {
        target: process.env.VUE_APP_API_BASE_URL,
        changeOrigin: true,
        // pathRewrite:{
        //   "^/file": "",
        // }
      },
      "/base": {
        target: process.env.VUE_APP_API_BASE_URL,
        changeOrigin: true,
        cookieDomainRewrite: "localhost",
      },
      "/bill": {
        target: process.env.VUE_APP_API_BASE_URL,
        changeOrigin: true,
        cookieDomainRewrite: "localhost",
      },
      "/uploads": {
        target: process.env.VUE_APP_API_BASE_URL,
        changeOrigin: true,
        // pathRewrite:{
        //   "^/file": "",
        // }
      },
    },
  },
});
