Mercurial > gemma
view client/vue.config.js @ 1400:7ba1de867c8d
client: fix Makefile for translations
* Fix location of translations.json in Makefile, which was forgotten
when reorganising the directory.
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 28 Nov 2018 15:56:38 +0100 |
parents | bc55ffaeb639 |
children | ef388dcbb946 |
line wrap: on
line source
const CopyWebpackPlugin = require("copy-webpack-plugin"); const PurgecssPlugin = require("purgecss-webpack-plugin"); const glob = require("glob-all"); const path = require("path"); 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 }); config.plugin("PurgecssPlugin").use(PurgecssPlugin, [ { paths: glob.sync([ path.join(__dirname, "./src/index.html"), path.join(__dirname, "./**/*.vue"), path.join(__dirname, "./src/**/*.js") ]) } ]); }, css: { loaderOptions: { // pass options to sass-loader sass: { // @/ is an alias to src/ data: `@import "@/assets/application.sass";` } } }, devServer: { proxy: { "/api": { target: process.env.VUE_BACKEND_API_URL, secure: false }, "/img/*": { target: "http://localhost:5000", secure: false } }, disableHostCheck: true } };