From 5323f6ca4bd50e67f3e60a0704d20f7d4648f123 Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Fri, 23 Apr 2021 19:52:18 -0700 Subject: [PATCH] Lazy load SchemaAnalyzerTab (#722) --- src/Explorer/Tree/Collection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Explorer/Tree/Collection.ts b/src/Explorer/Tree/Collection.ts index 97da4ccfb..4335b56fe 100644 --- a/src/Explorer/Tree/Collection.ts +++ b/src/Explorer/Tree/Collection.ts @@ -29,7 +29,6 @@ import MongoQueryTab from "../Tabs/MongoQueryTab"; import MongoShellTab from "../Tabs/MongoShellTab"; import QueryTab from "../Tabs/QueryTab"; import QueryTablesTab from "../Tabs/QueryTablesTab"; -import SchemaAnalyzerTab from "../Tabs/SchemaAnalyzerTab"; import { CollectionSettingsTabV2 } from "../Tabs/SettingsTabV2"; import ConflictId from "./ConflictId"; import DocumentId from "./DocumentId"; @@ -515,9 +514,10 @@ export default class Collection implements ViewModels.Collection { } }; - public onSchemaAnalyzerClick = () => { + public onSchemaAnalyzerClick = async () => { this.container.selectedNode(this); this.selectedSubnodeKind(ViewModels.CollectionTabKind.SchemaAnalyzer); + const SchemaAnalyzerTab = await (await import("../Tabs/SchemaAnalyzerTab")).default; TelemetryProcessor.trace(Action.SelectItem, ActionModifiers.Mark, { description: "Mongo Schema node", databaseName: this.databaseId,