view client/vue.config.js @ 1665:da0d1a19ebe6

Fairway availability import: Made schedulable, too.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 23 Dec 2018 13:30:33 +0100
parents 18ddb6935aa6
children eb832d81b67a
line wrap: on
line source

const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
  outputDir: "../web",
  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
      });
  },
  css: {
    loaderOptions: {
      // pass options to sass-loader
      sass: {
        // @/ is an alias to src/
        data: `@import "@/assets/application.scss";`
      }
    }
  },
  devServer: {
    proxy: {
      "/api": {
        target: process.env.VUE_BACKEND_API_URL,
        secure: false
      },
      "/img/*": {
        target: "http://localhost:5000",
        secure: false
      }
    },
    disableHostCheck: true
  }
};