(originalError: Error)
| 562 | } |
| 563 | |
| 564 | export function logCannotLoadConfigAsCjs(originalError: Error): RollupLog { |
| 565 | return tweakStackMessage( |
| 566 | { |
| 567 | cause: originalError, |
| 568 | code: INVALID_CONFIG_MODULE_FORMAT, |
| 569 | message: `Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.\n\nOriginal error: ${originalError.message}`, |
| 570 | stack: originalError.stack, |
| 571 | url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS) |
| 572 | }, |
| 573 | originalError.message |
| 574 | ); |
| 575 | } |
| 576 | |
| 577 | export function logCannotLoadConfigAsEsm(originalError: Error): RollupLog { |
| 578 | return tweakStackMessage( |
no test coverage detected
searching dependent graphs…