/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/errors/CommentCompilationWarning.js
39 строк
1 KB
Alexander Akait
refactor: move errors and warnings into own directory (#20867)
24 апр 2026, 17:18
Не верифицирован
24 апр 2026, 17:18
1d9d029
Код
Авторство
О чём код?
/* 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"); /** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ /** * Warning used for comment-related compilation issues, such as malformed magic * comments that webpack can parse but wants to report. */ class CommentCompilationWarning extends WebpackError { /** * Captures a warning message together with the dependency location that * triggered it. * @param {string} message warning message * @param {DependencyLocation} loc affected lines of code */ constructor(message, loc) { super(message); /** @type {string} */ this.name = "CommentCompilationWarning"; /** @type {DependencyLocation} */ this.loc = loc; } } makeSerializable( CommentCompilationWarning, "webpack/lib/errors/CommentCompilationWarning" ); module.exports = CommentCompilationWarning;