* Returns the source code that will be included at the end of the module. * @param {GenerateContext} context context * @returns {string | Source | undefined} the source code that will be included at the end of the module
(context)
| 86 | * @returns {string | Source | undefined} the source code that will be included at the end of the module |
| 87 | */ |
| 88 | getEndContent(context) { |
| 89 | if (this.runtimeCondition === false || !this.endContent) return ""; |
| 90 | if (this.runtimeCondition === true) return this.endContent; |
| 91 | const expr = context.runtimeTemplate.runtimeConditionExpression({ |
| 92 | chunkGraph: context.chunkGraph, |
| 93 | runtimeRequirements: context.runtimeRequirements, |
| 94 | runtime: context.runtime, |
| 95 | runtimeCondition: this.runtimeCondition |
| 96 | }); |
| 97 | if (expr === "true") return this.endContent; |
| 98 | return wrapInCondition(expr, this.endContent); |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Returns merged fragment. |
nothing calls this directly
no test coverage detected