MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / setNodePart

Method setNodePart

plugin/module-mapper.ts:88–99  ·  view source on GitHub ↗
(bundleId: string, moduleId: string, value: ModuleLengths)

Source from the content-addressed store, hash-verified

86 }
87
88 setNodePart(bundleId: string, moduleId: string, value: ModuleLengths): ModuleUID {
89 const uid = this.getBundleModuleUid(bundleId, moduleId);
90 if (uid in this.nodeParts) {
91 throw new Error(
92 `Override module: bundle id ${bundleId}, module id ${moduleId}, value ${JSON.stringify(
93 value,
94 )}, existing value: ${JSON.stringify(this.nodeParts[uid])}`,
95 );
96 }
97 this.nodeParts[uid] = { ...value, metaUid: this.getModuleUid(moduleId) };
98 return uid;
99 }
100
101 setNodeMeta(moduleId: string, value: { isEntry?: boolean; isExternal?: boolean }): void {
102 this.getModuleUid(moduleId);

Callers 2

generateBundleFunction · 0.95
buildTreeFunction · 0.80

Calls 2

getBundleModuleUidMethod · 0.95
getModuleUidMethod · 0.95

Tested by

no test coverage detected