| | |
| | | const Template = require("../Template"); |
| | | |
| | | /** @typedef {import("../Chunk")} Chunk */ |
| | | /** @typedef {import("../Chunk").ChunkChildOfTypeInOrder} ChunkChildOfTypeInOrder */ |
| | | /** @typedef {import("../Compilation")} Compilation */ |
| | | |
| | | class ChunkPrefetchStartupRuntimeModule extends RuntimeModule { |
| | | /** |
| | | * @param {{ onChunks: Chunk[], chunks: Set<Chunk> }[]} startupChunks chunk ids to trigger when chunks are loaded |
| | | * @param {ChunkChildOfTypeInOrder[]} startupChunks chunk ids to trigger when chunks are loaded |
| | | */ |
| | | constructor(startupChunks) { |
| | | super("startup prefetch", RuntimeModule.STAGE_TRIGGER); |
| | | /** @type {ChunkChildOfTypeInOrder[]} */ |
| | | this.startupChunks = startupChunks; |
| | | } |
| | | |
| | | /** |
| | | * Generates runtime code for this runtime module. |
| | | * @returns {string | null} runtime code |
| | | */ |
| | | generate() { |