Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
36
node_modules/next/dist/build/webpack/loaders/error-loader.js
generated
vendored
Normal file
36
node_modules/next/dist/build/webpack/loaders/error-loader.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _picocolors = require("../../../lib/picocolors");
|
||||
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const ErrorLoader = function() {
|
||||
var _this__module_issuer, _this__module, _this__compiler;
|
||||
// @ts-ignore exists
|
||||
const options = this.getOptions() || {};
|
||||
const { reason = 'An unknown error has occurred' } = options;
|
||||
// @ts-expect-error
|
||||
const resource = ((_this__module = this._module) == null ? void 0 : (_this__module_issuer = _this__module.issuer) == null ? void 0 : _this__module_issuer.resource) ?? null;
|
||||
const context = this.rootContext ?? ((_this__compiler = this._compiler) == null ? void 0 : _this__compiler.context);
|
||||
const issuer = resource ? context ? _path.default.relative(context, resource) : resource : null;
|
||||
const err = Object.defineProperty(new Error(reason + (issuer ? `\nLocation: ${(0, _picocolors.cyan)(issuer)}` : '')), "__NEXT_ERROR_CODE", {
|
||||
value: "E339",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
this.emitError(err);
|
||||
};
|
||||
const _default = ErrorLoader;
|
||||
|
||||
//# sourceMappingURL=error-loader.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue