* Returns the estimated size for the requested source type. * @param {NormalModule} module the module * @param {SourceType=} type source type * @returns {number} estimate size of the module
(module, type)
| 150 | * @returns {number} estimate size of the module |
| 151 | */ |
| 152 | getSize(module, type) { |
| 153 | /** @type {JsonValue | undefined} */ |
| 154 | const data = |
| 155 | module.buildInfo && |
| 156 | module.buildInfo.jsonData && |
| 157 | module.buildInfo.jsonData.get(); |
| 158 | if (!data) return 0; |
| 159 | return /** @type {string} */ (stringifySafe(data)).length + 10; |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Returns the reason this module cannot be concatenated, when one exists. |
nothing calls this directly
no test coverage detected