From 90140d3b6e6ab155d34dbefe7d4e1344272ccbe2 Mon Sep 17 00:00:00 2001 From: Felix Schmenger Date: Mon, 22 Mar 2021 12:20:09 +0100 Subject: [PATCH 1/5] Added missing material design icons (@mdi/font), as these are used in the current Vuetify configuration. --- package-lock.json | 5 +++++ package.json | 3 ++- src/main.js | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 9f20ae80..e364691a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,6 +75,11 @@ "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=" }, + "@mdi/font": { + "version": "5.9.55", + "resolved": "https://registry.npmjs.org/@mdi/font/-/font-5.9.55.tgz", + "integrity": "sha512-jswRF6q3eq8NWpWiqct6q+6Fg/I7nUhrxYJfiEM8JJpap0wVJLQdbKtyS65GdlK7S7Ytnx3TTi/bmw+tBhkGmg==" + }, "@sinonjs/commons": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", diff --git a/package.json b/package.json index ca5e32b9..c253b28b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "ol": "6.4.3", "proj4": "2.5.0", "vue": "2.6.11", - "vuetify": "2.2.18" + "vuetify": "2.2.18", + "@mdi/font": "^5.9.55" }, "devDependencies": { "@vue/test-utils": "^1.0.3", diff --git a/src/main.js b/src/main.js index 361b2260..b381bee8 100644 --- a/src/main.js +++ b/src/main.js @@ -2,6 +2,7 @@ // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue'; import Vuetify from 'vuetify'; +import '@mdi/font/css/materialdesignicons.css' import '../node_modules/ol/ol.css'; import WguApp from '../app/WguApp'; import UrlUtil from './util/Url'; From 43daa29b649da8f5648f1e42c274ba6a3ca2c197 Mon Sep 17 00:00:00 2001 From: Felix Schmenger Date: Mon, 22 Mar 2021 12:53:33 +0100 Subject: [PATCH 2/5] Include material icons instead of loading them via google CDN. --- index.html | 3 --- package-lock.json | 5 +++++ package.json | 5 +++-- src/main.js | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index cb787058..bb9c6c2c 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,6 @@ Wegue WebGIS - - -
diff --git a/package-lock.json b/package-lock.json index e364691a..40b98f7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6819,6 +6819,11 @@ "resolved": "https://registry.npmjs.org/mapbox-to-css-font/-/mapbox-to-css-font-2.4.0.tgz", "integrity": "sha512-v674D0WtpxCXlA6E+sBlG1QJWdUkz/s9qAD91bJSXBGuBL5lL4tJXpoJEftecphCh2SVQCjWMS2vhylc3AIQTg==" }, + "material-icons": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/material-icons/-/material-icons-0.5.4.tgz", + "integrity": "sha512-5ycazkNmIOtV78Ff3WgvxQESoJuujdRm0cNbf18fmyJN20jHyqp9rpwi4EfQyGimag0ZLElxtVg3H9enIKdOOw==" + }, "math-expression-evaluator": { "version": "1.2.17", "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", diff --git a/package.json b/package.json index c253b28b..5b10ece3 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,12 @@ "init:app": "node util/init-app.js" }, "dependencies": { + "@mdi/font": "^5.9.55", + "material-icons": "^0.5.4", "ol": "6.4.3", "proj4": "2.5.0", "vue": "2.6.11", - "vuetify": "2.2.18", - "@mdi/font": "^5.9.55" + "vuetify": "2.2.18" }, "devDependencies": { "@vue/test-utils": "^1.0.3", diff --git a/src/main.js b/src/main.js index b381bee8..6d093ecc 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import Vue from 'vue'; import Vuetify from 'vuetify'; import '@mdi/font/css/materialdesignicons.css' +import 'material-icons/iconfont/material-icons.css' import '../node_modules/ol/ol.css'; import WguApp from '../app/WguApp'; import UrlUtil from './util/Url'; From e6ca6737773e613a69bb2177e362c22a229b730f Mon Sep 17 00:00:00 2001 From: Felix Schmenger Date: Tue, 23 Mar 2021 10:25:34 +0100 Subject: [PATCH 3/5] Include material icons instead of loading them via google CDN - fix for embedded.html. --- embedded.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/embedded.html b/embedded.html index 7a1482d5..b8e80c3f 100644 --- a/embedded.html +++ b/embedded.html @@ -5,9 +5,6 @@ Wegue WebGIS Embedded - - -
From 2acc1c1f757059f875175df13d19309b7698d188 Mon Sep 17 00:00:00 2001 From: Felix Schmenger Date: Mon, 31 May 2021 14:33:52 +0200 Subject: [PATCH 4/5] Fix packaging of resources referenced in css files, which were previously ignored by webpack. --- build/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/utils.js b/build/utils.js index 65991421..5220a400 100644 --- a/build/utils.js +++ b/build/utils.js @@ -16,7 +16,6 @@ exports.cssLoaders = function (options) { loader: 'css-loader', options: { minimize: process.env.NODE_ENV === 'production', - url: process.env.NODE_ENV !== 'production', sourceMap: options.sourceMap } } @@ -35,8 +34,13 @@ exports.cssLoaders = function (options) { // Extract CSS when that option is specified // (which is the case during production build) + // Remarks: Unfortunately ExtractTextPlugin is not able to rewrite url paths to resources + // referenced in the extracted css. As a workaround, override publicPath, which will work because all + // css resources end up in /static/css. For more information see + // https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27 if (options.extract) { return ExtractTextPlugin.extract({ + publicPath: '../../', use: loaders, fallback: 'vue-style-loader' }) From f6a9fa2c3417cfe356e6485bb24b38240ee64cee Mon Sep 17 00:00:00 2001 From: Felix Schmenger Date: Mon, 31 May 2021 14:38:04 +0200 Subject: [PATCH 5/5] Turn @mdi/font and material-icons into dev dependencies. --- package-lock.json | 6 ++++-- package.json | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9db18b7..bf661f20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1568,7 +1568,8 @@ "@mdi/font": { "version": "5.9.55", "resolved": "https://registry.npmjs.org/@mdi/font/-/font-5.9.55.tgz", - "integrity": "sha512-jswRF6q3eq8NWpWiqct6q+6Fg/I7nUhrxYJfiEM8JJpap0wVJLQdbKtyS65GdlK7S7Ytnx3TTi/bmw+tBhkGmg==" + "integrity": "sha512-jswRF6q3eq8NWpWiqct6q+6Fg/I7nUhrxYJfiEM8JJpap0wVJLQdbKtyS65GdlK7S7Ytnx3TTi/bmw+tBhkGmg==", + "dev": true }, "@sinonjs/commons": { "version": "1.8.1", @@ -8005,7 +8006,8 @@ "material-icons": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/material-icons/-/material-icons-0.5.4.tgz", - "integrity": "sha512-5ycazkNmIOtV78Ff3WgvxQESoJuujdRm0cNbf18fmyJN20jHyqp9rpwi4EfQyGimag0ZLElxtVg3H9enIKdOOw==" + "integrity": "sha512-5ycazkNmIOtV78Ff3WgvxQESoJuujdRm0cNbf18fmyJN20jHyqp9rpwi4EfQyGimag0ZLElxtVg3H9enIKdOOw==", + "dev": true }, "math-expression-evaluator": { "version": "1.2.17", diff --git a/package.json b/package.json index ba72b4ce..2eab94e8 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,6 @@ "init:app": "node util/init-app.js" }, "dependencies": { - "@mdi/font": "^5.9.55", - "material-icons": "^0.5.4", "ol": "6.4.3", "proj4": "2.5.0", "vue": "2.6.11", @@ -34,6 +32,7 @@ "@babel/preset-env": "^7.0.0", "@babel/register": "^7.0.0", "@babel/runtime-corejs3": "^7.13.10", + "@mdi/font": "^5.9.55", "@vue/test-utils": "^1.0.3", "autoprefixer": "^9.8.0", "babel-eslint": "^9.0.0", @@ -74,6 +73,7 @@ "karma-sourcemap-loader": "^0.3.7", "karma-spec-reporter": "^0.0.32", "karma-webpack": "^3.0.5", + "material-icons": "^0.5.4", "mocha": "^6.2.3", "opn": "^6.0.0", "optimize-css-assets-webpack-plugin": "^2.0.0",