* Returns entry module. * @deprecated * @returns {Module | undefined} entry module
()
| 141 | * @returns {Module | undefined} entry module |
| 142 | */ |
| 143 | get entryModule() { |
| 144 | const entryModules = [ |
| 145 | ...ChunkGraph.getChunkGraphForChunk( |
| 146 | this, |
| 147 | "Chunk.entryModule", |
| 148 | "DEP_WEBPACK_CHUNK_ENTRY_MODULE" |
| 149 | ).getChunkEntryModulesIterable(this) |
| 150 | ]; |
| 151 | if (entryModules.length === 0) { |
| 152 | return undefined; |
| 153 | } else if (entryModules.length === 1) { |
| 154 | return entryModules[0]; |
| 155 | } |
| 156 | |
| 157 | throw new Error( |
| 158 | "Module.entryModule: Multiple entry modules are not supported by the deprecated API (Use the new ChunkGroup API)" |
| 159 | ); |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Checks whether this chunk has an entry module. |
nothing calls this directly
no test coverage detected