view client/vue.config.js @ 5704:a68e8eae7273 sr-v2

Dont store bounding boxes in v2 meshes.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 19 Feb 2024 18:27:40 +0100
parents 84d01a536bec
children
line wrap: on
line source

const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
  outputDir: "../web",
  configureWebpack: {
    devtool: "source-map"
  },
  chainWebpack: config => {
    let vendorImgPath = process.env.VUE_APP_VENDOR_IMG_PATH;
    if (!vendorImgPath) return;
    config
      .plugin("CopyWebpackPlugin")
      .use(CopyWebpackPlugin, [[{ from: vendorImgPath, to: "img" }]], {
        copyUnmodified: true
      });
    if (process.env.ANALYZE) {
      var BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
        .BundleAnalyzerPlugin;
      config.plugin("BundleAnalyzerPlugin").use(BundleAnalyzerPlugin, []);
    }
  },
  devServer: {
    proxy: {
      "/api": {
        target: process.env.VUE_BACKEND_API_URL,
        secure: false
      },
      "/img/*": {
        target: "http://localhost:5000",
        secure: false
      }
    },
    disableHostCheck: true
  }
};