diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6e72481..8ea1a6a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -45,6 +45,7 @@ "eslint-config-prettier": "^8.10.0", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.0.0", + "preload-webpack-plugin": "^3.0.0-beta.4", "prettier": "^3.2.5", "sass": "1.33.0", "terser-webpack-plugin": "^5.3.10", @@ -11643,6 +11644,19 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/preload-webpack-plugin": { + "version": "3.0.0-beta.4", + "resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz", + "integrity": "sha512-6hhh0AswCbp/U4EPVN4fbK2wiDkXhmgjjgEYEmXa21UYwjYzCIgh3ZRMXM21ZPLfbQGpdFuSL3zFslU+edjpwg==", + "dev": true, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "html-webpack-plugin": ">=3.0.0", + "webpack": ">=4.0.0" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -23712,6 +23726,13 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "preload-webpack-plugin": { + "version": "3.0.0-beta.4", + "resolved": "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz", + "integrity": "sha512-6hhh0AswCbp/U4EPVN4fbK2wiDkXhmgjjgEYEmXa21UYwjYzCIgh3ZRMXM21ZPLfbQGpdFuSL3zFslU+edjpwg==", + "dev": true, + "requires": {} + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index 255af1b..8643b54 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -49,7 +49,8 @@ "autoprefixer": "^10.4.2", "css-minimizer-webpack-plugin": "^7.0.0", "dotenv": "^16.3.1", - "eslint": "^8.10.0", + "preload-webpack-plugin": "^3.0.0-beta.4", + "eslint": "^8.10.0", "eslint-config-prettier": "^8.10.0", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.0.0", diff --git a/frontend/quasar.config.js b/frontend/quasar.config.js index 7a3d70d..93acf48 100644 --- a/frontend/quasar.config.js +++ b/frontend/quasar.config.js @@ -12,12 +12,13 @@ const { configure } = require('quasar/wrappers'); const dotenv = require('dotenv'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); +const PreloadWebpackPlugin = require('preload-webpack-plugin'); dotenv.config(); const path = require('path'); -module.exports = configure(function (/* ctx */) { +module.exports = configure(function (ctx) { return { // https://v2.quasar.dev/quasar-cli-webpack/supporting-ts supportTS: { @@ -91,8 +92,18 @@ module.exports = configure(function (/* ctx */) { // polyfillModulePreload: true, // distDir - // extendViteConf (viteConf) {}, - // viteVuePluginOptions: {}, + extendWebpack(cfg) { + !ctx.dev && + cfg.plugins.push( + new PreloadWebpackPlugin({ + rel: 'preload', + include: 'allAssets', + fileWhitelist: [/.+MaterialSymbolsRounded.+/], + as: 'font' + }) + ); + }, + chainWebpack(chain, { isClient, isServer }) { chain.resolve.alias .set('assets', path.resolve('src/assets')) @@ -163,7 +174,7 @@ module.exports = configure(function (/* ctx */) { } : { '/app-store': { - target: `https://market.${process.env.ACCOUNT}.myterminus.com`, + target: `https://market.${process.env.ACCOUNT_DOMAIN}`, changeOrigin: true } } diff --git a/frontend/src/index.template.html b/frontend/src/index.template.html index 798a468..670742d 100644 --- a/frontend/src/index.template.html +++ b/frontend/src/index.template.html @@ -8,46 +8,57 @@ --reading-editable-line-length: 648px; " > -<head> - <title><%= productName %></title> - <meta charset="utf-8"/> - <meta name="description" content="<%= productDescription %>"/> - <meta name="format-detection" content="telephone=no"/> - <meta name="referrer" content="no-referrer"/> - <meta name="msapplication-tap-highlight" content="no"/> - <meta - name="viewport" - content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" - /> + <head> + <title><%= productName %></title> + <meta charset="utf-8" /> + <meta name="description" content="<%= productDescription %>" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="referrer" content="no-referrer" /> + <meta name="msapplication-tap-highlight" content="no" /> + <meta + name="viewport" + content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" + /> - <link - rel="icon" - type="image/png" - sizes="128x128" - href="icons/market-128*128.png" - /> - <link - rel="icon" - type="image/png" - sizes="96x96" - href="icons/market-96*96.png" - /> - <link - rel="icon" - type="image/png" - sizes="32x32" - href="icons/market-32*32.png" - /> - <link - rel="icon" - type="image/png" - sizes="16x16" - href="icons/market-16*16.png" - /> - <link rel="icon" type="image/ico" href="wise.ico"/> -</head> -<body> -<!-- DO NOT touch the following DIV --> -<div id="q-app"></div> -</body> + <link + rel="icon" + type="image/png" + sizes="128x128" + href="icons/market-128*128.png" + /> + <link + rel="icon" + type="image/png" + sizes="96x96" + href="icons/market-96*96.png" + /> + <link + rel="icon" + type="image/png" + sizes="32x32" + href="icons/market-32*32.png" + /> + <link + rel="icon" + type="image/png" + sizes="16x16" + href="icons/market-16*16.png" + /> + <link rel="icon" type="image/ico" href="wise.ico" /> + </head> + <body> + <!-- DO NOT touch the following DIV --> + <div id="q-app"></div> + </body> </html> +<script> + if (navigator.platform.indexOf('Win') !== -1) { + document.body.classList.add('windows'); + } +</script> +<style> + body.windows ::-webkit-scrollbar { + width: 0 !important; + height: 0 !important; + } +</style> diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 1558e34..d383dc4 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -4612,7 +4612,7 @@ html-minifier-terser@^7.2.0: relateurl "^0.2.7" terser "^5.15.1" -html-webpack-plugin@5.6.0: +html-webpack-plugin@>=3.0.0, html-webpack-plugin@5.6.0: version "5.6.0" resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz" integrity sha512-iwaY4wzbe48AfKLZ/Cc8k0L+FKG6oSNRaZ8x5A/T/IVDGyXcbHncM9TdDa93wn0FsSm82FhTKW7f3vS61thXAw== @@ -6497,6 +6497,11 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: picocolors "^1.0.1" source-map-js "^1.2.0" +preload-webpack-plugin@^3.0.0-beta.4: + version "3.0.0-beta.4" + resolved "https://registry.npmjs.org/preload-webpack-plugin/-/preload-webpack-plugin-3.0.0-beta.4.tgz" + integrity sha512-6hhh0AswCbp/U4EPVN4fbK2wiDkXhmgjjgEYEmXa21UYwjYzCIgh3ZRMXM21ZPLfbQGpdFuSL3zFslU+edjpwg== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" @@ -8012,7 +8017,7 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -"webpack@^4.0.0 || ^5.0.0", "webpack@^4.1.0 || ^5.0.0-0", "webpack@^4.37.0 || ^5.0.0", webpack@^5, webpack@^5.0.0, webpack@^5.1.0, webpack@^5.20.0, webpack@^5.91.0, "webpack@>= 4", webpack@>=5: +"webpack@^4.0.0 || ^5.0.0", "webpack@^4.1.0 || ^5.0.0-0", "webpack@^4.37.0 || ^5.0.0", webpack@^5, webpack@^5.0.0, webpack@^5.1.0, webpack@^5.20.0, webpack@^5.91.0, "webpack@>= 4", webpack@>=4.0.0, webpack@>=5: version "5.92.1" resolved "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz" integrity sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==