* Renders module content. * @param {Source} source source * @param {Module} module module * @param {ModuleRenderContext} renderContext render context * @param {Omit<LibraryContext<T>, "options">} libraryContext context * @returns {Source} source with library export
(
source,
module,
{ factory, inlinedInIIFE, chunk },
libraryContext
)
| 548 | * @returns {Source} source with library export |
| 549 | */ |
| 550 | renderModuleContent( |
| 551 | source, |
| 552 | module, |
| 553 | { factory, inlinedInIIFE, chunk }, |
| 554 | libraryContext |
| 555 | ) { |
| 556 | const exportsSource = |
| 557 | module.buildMeta && |
| 558 | module.buildMeta.exportsSourceByRuntime && |
| 559 | module.buildMeta.exportsSourceByRuntime.get(getRuntimeKey(chunk.runtime)); |
| 560 | |
| 561 | // Re-add the module's exports source when rendered in factory |
| 562 | // or as an inlined startup module wrapped in an IIFE |
| 563 | if ((inlinedInIIFE || factory) && exportsSource) { |
| 564 | return new ConcatSource(exportsSource, source); |
| 565 | } |
| 566 | return source; |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | module.exports = ModuleLibraryPlugin; |
nothing calls this directly
no test coverage detected