diff --git a/resources/assets/vue/app.ts b/resources/assets/vue/app.ts index 878623a0..65973fdc 100644 --- a/resources/assets/vue/app.ts +++ b/resources/assets/vue/app.ts @@ -40,8 +40,8 @@ app.config.globalProperties.qr_code_img_url = 'https://api.qrserver.com/v1/creat app.config.globalProperties.route = window.route; -const modules = import.meta.glob('./**/*.vue', { eager: true }); - +//const modules = import.meta.glob('./**/*.vue', { eager: true }); +/* const STORAGE_KEY = 'shippingPortalComponents'; const usedComponents = new Set( @@ -93,15 +93,20 @@ function downloadUsedComponents() { } (window as any).downloadUsedComponents = downloadUsedComponents; +*/ + +// Remove data created by the previously disabled component tracking logic. +const LEGACY_COMPONENTS_STORAGE_KEY = 'shippingPortalComponents'; +localStorage.removeItem(LEGACY_COMPONENTS_STORAGE_KEY); // Auto-register components (eager loaded) -// const modules = import.meta.glob('./**/*.vue', { eager: true }); -// Object.entries(modules).forEach(([path, module]) => { -// const componentName = path.split('/').pop()?.split('.')[0]; -// if (componentName) { -// app.component(componentName, (module as any).default); -// } -// }); +const modules = import.meta.glob('./**/*.vue', { eager: true }); +Object.entries(modules).forEach(([path, module]) => { + const componentName = path.split('/').pop()?.split('.')[0]; + if (componentName) { + app.component(componentName, (module as any).default); + } +}); // Register tooltip directive app.directive('tooltip', {