Source code

Revision control

Copy as Markdown

Other Tools

/*
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
const makeSerializable = require("../util/makeSerializable");
const WebpackError = require("./WebpackError");
class NodeStuffInWebError extends WebpackError {
/**
* Creates an instance of NodeStuffInWebError.
* @param {DependencyLocation} loc loc
* @param {string} expression expression
* @param {string} description description
*/
constructor(loc, expression, description) {
super(
`${JSON.stringify(
expression
)} has been used, it will be undefined in next major version.
${description}`
);
/** @type {string} */
this.name = "NodeStuffInWebError";
/** @type {DependencyLocation} */
this.loc = loc;
}
}
makeSerializable(NodeStuffInWebError, "webpack/lib/errors/NodeStuffInWebError");
module.exports = NodeStuffInWebError;