From 0aa9975535e7c57fd823696350650f943511c19d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 26 Jan 2025 23:49:40 +0100 Subject: [PATCH] perf: refs #7826 code onError --- quasar.config.js | 7 +------ src/App.vue | 2 -- src/components/NavBar.vue | 1 - src/router/index.js | 7 ++----- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/quasar.config.js b/quasar.config.js index 49812d847..6d545c026 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -55,6 +55,7 @@ export default configure(function (/* ctx */) { browser: ['es2022', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], node: 'node18', }, + vueRouterMode: 'hash', // available values: 'hash', 'history' // vueRouterBase, // vueDevtools, @@ -67,12 +68,6 @@ export default configure(function (/* ctx */) { // env: {}, rawDefine: { 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), - 'process.env.BUILD_VERSION': JSON.stringify( - new Date() - .toISOString() - .replace(/[-:T.]/g, '') - .slice(0, 14), - ), // VersiĆ³n con marca de tiempo }, // ignorePublicFolder: true, // minify: false, diff --git a/src/App.vue b/src/App.vue index 1ac253110..27cc34c38 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,11 +34,9 @@ quasar.iconMapFn = (iconName) => { content: iconName, }; }; -const env = process.env.BUILD_VERSION; diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index c6f2375cf..ff0387820 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -65,7 +65,6 @@ const refresh = () => window.location.reload();
- {{ state }}
{ + Router.onError(({ message }) => { const errorMessages = [ 'Failed to fetch dynamically imported module', 'Importing a module script failed', ]; - state.set( - 'error', - errorMessages.some((msg) => error.message.includes(msg)), - ); + state.set('error', errorMessages.some(message.includes)); }); return Router; });