fix: refs #7408 fix quasarconfig, vncomponents
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2025-01-17 09:44:30 +01:00
parent 9b1554b123
commit edb701c353
2 changed files with 23 additions and 1 deletions

View File

@ -29,7 +29,16 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar', 'quasar.defaults'],
boot: [
'i18n',
'axios',
'vnDate',
'validations',
'quasar',
'quasar.defaults',
'global-components',
],
importStrategy: 'auto',
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],

13
src/boot/vn-components.js Normal file
View File

@ -0,0 +1,13 @@
// src/boot/vn-components.js
import { defineAsyncComponent } from 'vue';
const components = import.meta.glob('src/components/**/*.vue');
export default ({ app }) => {
for (const path in components) {
const componentName = path
.split('/')
.pop()
.replace(/\.\w+$/, '');
app.component(componentName, defineAsyncComponent(components[path]));
}
};