* Finish entry module. * @param {Module} module the exporting entry module * @param {string} entryName the name of the entrypoint * @param {LibraryContext<T>} libraryContext context * @returns {void}
(
module,
entryName,
{ options, compilation, compilation: { moduleGraph } }
)
| 177 | * @returns {void} |
| 178 | */ |
| 179 | finishEntryModule( |
| 180 | module, |
| 181 | entryName, |
| 182 | { options, compilation, compilation: { moduleGraph } } |
| 183 | ) { |
| 184 | const runtime = getEntryRuntime(compilation, entryName); |
| 185 | if (options.export) { |
| 186 | const exportsInfo = moduleGraph.getExportInfo( |
| 187 | module, |
| 188 | Array.isArray(options.export) ? options.export[0] : options.export |
| 189 | ); |
| 190 | exportsInfo.setUsed(UsageState.Used, runtime); |
| 191 | exportsInfo.canMangleUse = false; |
| 192 | exportsInfo.canInlineUse = false; |
| 193 | } else { |
| 194 | const exportsInfo = moduleGraph.getExportsInfo(module); |
| 195 | exportsInfo.setUsedInUnknownWay(runtime); |
| 196 | } |
| 197 | moduleGraph.addExtraReason(module, "used as library export"); |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Returns the prefix. |
nothing calls this directly
no test coverage detected