MCPcopy Create free account
hub / github.com/SAP/ui5-builder / writeRequires

Method writeRequires

lib/lbt/bundle/Builder.js:600–613  ·  view source on GitHub ↗
(section)

Source from the content-addressed store, hash-verified

598 }
599
600 async writeRequires(section) {
601 if (section.modules.length === 0) {
602 return;
603 }
604
605 this.outW.ensureNewLine();
606 if (section.async === false) {
607 section.modules.forEach( (module) => {
608 this.writeWithSourceMap(this.generateRequireSync(module));
609 });
610 } else {
611 this.writeWithSourceMap(this.generateRequire(section.modules));
612 }
613 }
614
615 // When AutoSplit is enabled for depCache, we need to ensure that modules
616 // are not duplicated across files. This might happen due to the filters provided.

Callers 1

addSectionMethod · 0.95

Calls 4

writeWithSourceMapMethod · 0.95
generateRequireSyncMethod · 0.95
generateRequireMethod · 0.95
ensureNewLineMethod · 0.80

Tested by

no test coverage detected