( outputOptions: NormalizedOutputOptions, log: LogHandler )
| 274 | } |
| 275 | |
| 276 | function validateOptionsForMultiChunkOutput( |
| 277 | outputOptions: NormalizedOutputOptions, |
| 278 | log: LogHandler |
| 279 | ) { |
| 280 | if (outputOptions.format === 'umd' || outputOptions.format === 'iife') |
| 281 | return error( |
| 282 | logInvalidOption( |
| 283 | 'output.format', |
| 284 | URL_OUTPUT_FORMAT, |
| 285 | 'UMD and IIFE output formats are not supported for code-splitting builds', |
| 286 | outputOptions.format |
| 287 | ) |
| 288 | ); |
| 289 | if (typeof outputOptions.file === 'string') |
| 290 | return error( |
| 291 | logInvalidOption( |
| 292 | 'output.file', |
| 293 | URL_OUTPUT_DIR, |
| 294 | 'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option' |
| 295 | ) |
| 296 | ); |
| 297 | if (outputOptions.sourcemapFile) |
| 298 | return error( |
| 299 | logInvalidOption( |
| 300 | 'output.sourcemapFile', |
| 301 | URL_OUTPUT_SOURCEMAPFILE, |
| 302 | '"output.sourcemapFile" is only supported for single-file builds' |
| 303 | ) |
| 304 | ); |
| 305 | if (!outputOptions.amd.autoId && outputOptions.amd.id) |
| 306 | log( |
| 307 | LOGLEVEL_WARN, |
| 308 | logInvalidOption( |
| 309 | 'output.amd.id', |
| 310 | URL_OUTPUT_AMD_ID, |
| 311 | 'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead' |
| 312 | ) |
| 313 | ); |
| 314 | } |
| 315 | |
| 316 | function getIncludedModules(modulesById: ReadonlyMap<string, Module | ExternalModule>): Module[] { |
| 317 | const includedModules: Module[] = []; |
no test coverage detected
searching dependent graphs…