perf: refs #7826 code onError
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2025-01-26 23:49:40 +01:00
parent 24c62b4533
commit 0aa9975535
4 changed files with 3 additions and 14 deletions

View File

@ -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,

View File

@ -34,11 +34,9 @@ quasar.iconMapFn = (iconName) => {
content: iconName,
};
};
const env = process.env.BUILD_VERSION;
</script>
<template>
<meta name="app-version" :content="env" />
<RouterView />
</template>

View File

@ -65,7 +65,6 @@ const refresh = () => window.location.reload();
<div id="searchbar-after"></div>
<QSpace />
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
{{ state }}
<div id="actions-prepend"></div>
<QIcon
name="refresh"

View File

@ -102,15 +102,12 @@ export default defineRouter(function (/* { store, ssrContext } */) {
document.title = title;
});
Router.onError((error) => {
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;
});