UNPKG

781 BJavaScriptView Raw
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const WebpackError = require("./WebpackError");
9const makeSerializable = require("./util/makeSerializable");
10
11/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
12
13class CommentCompilationWarning extends WebpackError {
14 /**
15 *
16 * @param {string} message warning message
17 * @param {DependencyLocation} loc affected lines of code
18 */
19 constructor(message, loc) {
20 super(message);
21
22 this.name = "CommentCompilationWarning";
23
24 this.loc = loc;
25
26 Error.captureStackTrace(this, this.constructor);
27 }
28}
29
30makeSerializable(
31 CommentCompilationWarning,
32 "webpack/lib/CommentCompilationWarning"
33);
34
35module.exports = CommentCompilationWarning;