( module, chunkGraph )
| 52 | * @returns {string} error message |
| 53 | */ |
| 54 | const noModuleIdErrorMessage = ( |
| 55 | module, |
| 56 | chunkGraph |
| 57 | ) => `Module ${module.identifier()} has no id assigned. |
| 58 | This should not happen. |
| 59 | It's in these chunks: ${ |
| 60 | Array.from( |
| 61 | chunkGraph.getModuleChunksIterable(module), |
| 62 | (c) => c.name || c.id || c.debugId |
| 63 | ).join(", ") || "none" |
| 64 | } (If module is in no chunk this indicates a bug in some chunk/module optimization logic) |
| 65 | Module has these incoming connections: ${Array.from( |
| 66 | chunkGraph.moduleGraph.getIncomingConnections(module), |
| 67 | (connection) => |
| 68 | `\n - ${connection.originModule && connection.originModule.identifier()} ${ |
| 69 | connection.dependency && connection.dependency.type |
| 70 | } ${ |
| 71 | (connection.explanations && [...connection.explanations].join(", ")) || "" |
| 72 | }` |
| 73 | ).join("")}`; |
| 74 | |
| 75 | /** |
| 76 | * Gets global object. |
no test coverage detected