annotate client/vue.config.js @ 904:e4b72a199258

New default bottleneck colors Mainly to make the stroke color one actually selectable in the ui. In addition the pink does better match the collors used on the ECDIS layer.
author Sascha Wilde <wilde@intevation.de>
date Tue, 02 Oct 2018 13:34:59 +0200
parents d025e1f5e71d
children 3907a7b98067
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
568
99968a7394f7 feat: PurgeCSS added to remove unnecessary CSS weight
Thomas Junk <thomas.junk@intevation.de>
parents: 500
diff changeset
1 const CopyWebpackPlugin = require("copy-webpack-plugin");
820
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
2 // const PurgecssPlugin = require("purgecss-webpack-plugin");
568
99968a7394f7 feat: PurgeCSS added to remove unnecessary CSS weight
Thomas Junk <thomas.junk@intevation.de>
parents: 500
diff changeset
3 const glob = require("glob-all");
99968a7394f7 feat: PurgeCSS added to remove unnecessary CSS weight
Thomas Junk <thomas.junk@intevation.de>
parents: 500
diff changeset
4 const path = require("path");
23
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
5
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
6 module.exports = {
21
d16f799e0469 Configure Webpack to put its output to web-folder
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
7 outputDir: "../web",
23
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
8 chainWebpack: config => {
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
9 let vendorImgPath = process.env.VUE_APP_VENDOR_IMG_PATH;
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
10 if (!vendorImgPath) return;
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
11 config
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
12 .plugin("CopyWebpackPlugin")
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
13 .use(CopyWebpackPlugin, [[{ from: vendorImgPath, to: "img" }]], {
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
14 copyUnmodified: true
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
15 });
820
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
16 // config.plugin("PurgecssPlugin").use(PurgecssPlugin, [
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
17 // {
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
18 // paths: glob.sync([
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
19 // path.join(__dirname, "./src/index.html"),
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
20 // path.join(__dirname, "./**/*.vue"),
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
21 // path.join(__dirname, "./src/**/*.js")
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
22 // ])
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
23 // }
d025e1f5e71d purgecss behaves unexpected
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
24 // ]);
23
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
25 },
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
26 css: {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
27 loaderOptions: {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
28 // pass options to sass-loader
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
29 sass: {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
30 // @/ is an alias to src/
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
31 // so this assumes you have a file named `src/variables.scss`
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
32 data: `@import "@/application/assets/application.scss";`
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
33 }
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
34 }
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 568
diff changeset
35 },
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 devServer: {
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 proxy: {
329
71970f03c9e8 SPA: Fixed setup for proxy in "serve" dev server mode.
Sascha Wilde <wilde@intevation.de>
parents: 23
diff changeset
38 "/api": {
353
a80e589c5ade fix: Fix broken environment variable setting
Thomas Junk <thomas.junk@intevation.de>
parents: 329
diff changeset
39 target: process.env.VUE_BACKEND_API_URL,
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 secure: false
11
e0b5dd98665e current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents: 3
diff changeset
41 },
23
c1ef0be0ae3d Improve build chain
Thomas Junk <thomas.junk@intevation.de>
parents: 21
diff changeset
42 "/img/*": {
11
e0b5dd98665e current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents: 3
diff changeset
43 target: "http://localhost:5000",
e0b5dd98665e current frontend with asset server configured
Thomas Junk <thomas.junk@intevation.de>
parents: 3
diff changeset
44 secure: false
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 }
500
f6d61657b487 Allow accessing client from outside localhost via hostname
Tom Gottfried <tom@intevation.de>
parents: 353
diff changeset
46 },
f6d61657b487 Allow accessing client from outside localhost via hostname
Tom Gottfried <tom@intevation.de>
parents: 353
diff changeset
47 disableHostCheck: true
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 }
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 };