You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message: `Rollup transpiled your configuration to an ES module even though it appears to contain CommonJS elements. To resolve this, you can pass the "--bundleConfigAsCjs" flag to Rollup or change your configuration to only contain valid ESM code.\n\nOriginal error: ${originalError.message}`,
521
-
stack: originalError.stack,
522
-
url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
523
-
};
526
+
returntweakStackMessage(
527
+
{
528
+
cause: originalError,
529
+
code: INVALID_CONFIG_MODULE_FORMAT,
530
+
message: `Rollup transpiled your configuration to an ES module even though it appears to contain CommonJS elements. To resolve this, you can pass the "--bundleConfigAsCjs" flag to Rollup or change your configuration to only contain valid ESM code.\n\nOriginal error: ${originalError.message}`,
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}`,
531
-
stack: originalError.stack,
532
-
url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
533
-
};
539
+
returntweakStackMessage(
540
+
{
541
+
cause: originalError,
542
+
code: INVALID_CONFIG_MODULE_FORMAT,
543
+
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}`,
message: `Node tried to load your configuration as an ES module even though it is likely CommonJS. To resolve this, change the extension of your configuration to ".cjs" or pass the "--bundleConfigAsCjs" flag.\n\nOriginal error: ${originalError.message}`,
541
-
stack: originalError.stack,
542
-
url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
543
-
};
552
+
returntweakStackMessage(
553
+
{
554
+
cause: originalError,
555
+
code: INVALID_CONFIG_MODULE_FORMAT,
556
+
message: `Node tried to load your configuration as an ES module even though it is likely CommonJS. To resolve this, change the extension of your configuration to ".cjs" or pass the "--bundleConfigAsCjs" flag.\n\nOriginal error: ${originalError.message}`,
0 commit comments