/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/errors/ModuleDependencyError.js
48 строк
1 KB
Alexander Akait
fix(css): terminate a string or url() the tokenizer closed at EOF (#21624)
07 авг 2026, 16:56
Не верифицирован
07 авг 2026, 16:56
21af4f5
Код
Авторство
О чём код?
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const makeSerializable = require("../util/makeSerializable"); const WebpackError = require("./WebpackError"); const deriveStackFromNestedError = require("./deriveStackFromNestedError"); /** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ /** @typedef {import("../Module")} Module */ /** @typedef {import("./ModuleBuildError").ErrorWithHideStack} ErrorWithHideStack */ class ModuleDependencyError extends WebpackError { /** * Creates an instance of ModuleDependencyError. * @param {Module} module module tied to dependency * @param {ErrorWithHideStack} err error thrown * @param {DependencyLocation} loc location of dependency */ constructor(module, err, loc) { // Deserialization constructs with no arguments, so `err` is absent there. super(err ? err.message : ""); /** @type {string} */ this.name = "ModuleDependencyError"; /** @type {Module} */ this.module = module; /** @type {DependencyLocation} */ this.loc = loc; /** * error is not (de)serialized, so it might be undefined after deserialization * @type {ErrorWithHideStack} */ this.error = err; deriveStackFromNestedError(this, err); } } makeSerializable( ModuleDependencyError, "webpack/lib/errors/ModuleDependencyError" ); module.exports = ModuleDependencyError;