* Generates generated code for this runtime module. * @param {NormalModule} module module for which the code should be generated * @param {GenerateContext} generateContext context for generate * @returns {Source | null} generated code
(module, generateContext)
| 262 | * @returns {Source | null} generated code |
| 263 | */ |
| 264 | generate(module, generateContext) { |
| 265 | const originalSource = module.originalSource(); |
| 266 | if (!originalSource) { |
| 267 | return DEFAULT_SOURCE.source(); |
| 268 | } |
| 269 | |
| 270 | const source = new ReplaceSource(originalSource); |
| 271 | /** @type {InitFragment<GenerateContext>[]} */ |
| 272 | const initFragments = []; |
| 273 | |
| 274 | this.sourceModule(module, initFragments, source, generateContext); |
| 275 | |
| 276 | return InitFragment.addToSource(source, initFragments, generateContext); |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Generates fallback output for the provided error condition. |
nothing calls this directly
no test coverage detected