const { defineConfig } = require("@vue/cli-service");
const proxy_url = process.env.VUE_APP_PROXY_URL;

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  assetsDir: "showviewer",
  productionSourceMap: false,
  publicPath: "./",
  pages: {
    // show: "src/pages/show.js",
    showMobile: "src/pages/showMobile.js",
  },
  css: {
    extract: false,
    loaderOptions: {
      scss: {},
    },
  },
  devServer: {
    // port: 443,
    // https: true,
    headers: {
      "Cache-Control": "no-store",
    },
    proxy: {
      "/manage": {
        target: proxy_url,
        changeOrigin: true,
      },
      "/web": {
        target: proxy_url,
        changeOrigin: true,
      },
      "/api": {
        target: process.env.VUE_APP_PROXY_URL_ROOT,
        changeOrigin: true,
      },
    },
  },
});
