next
Version:
The React Framework
14 lines (13 loc) • 570 B
JavaScript
const nextInvalidImportErrorLoader = function() {
const { message } = this.getOptions();
const error = new Error(message);
if (process.env.NEXT_RSPACK) {
// Rspack uses miette for error formatting, which automatically includes stack
// traces in the error message. To avoid showing redundant stack information
// in the final error output, we clear the stack property.
error.stack = undefined;
}
throw error;
};
export default nextInvalidImportErrorLoader;
//# sourceMappingURL=next-invalid-import-error-loader.js.map