Update: Vue 2 to Vue 3 with Typescript, node 14 to node 22, Jenkinsfile, Dockerfile, vapor.yml (Post PROD Deployment)

This commit is contained in:
Dillon Ngo
2026-07-22 03:05:31 +08:00
parent f05ce01a40
commit fe1df936ed
+14 -9
View File
@@ -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<string>(
@@ -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', {