webpack/lib/CommentCompilationWarning.js

33 lines
725 B
JavaScript
Raw Permalink Normal View History

2018-06-04 17:20:43 +08:00
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
2018-07-30 23:08:51 +08:00
2018-06-04 17:20:43 +08:00
"use strict";
const WebpackError = require("./WebpackError");
2018-10-25 16:47:52 +08:00
const makeSerializable = require("./util/makeSerializable");
2018-06-04 17:20:43 +08:00
2018-07-09 20:48:28 +08:00
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
2018-06-15 00:25:43 +08:00
2018-06-04 17:20:43 +08:00
class CommentCompilationWarning extends WebpackError {
2018-06-15 00:25:43 +08:00
/**
* @param {string} message warning message
* @param {DependencyLocation} loc affected lines of code
2018-06-15 00:25:43 +08:00
*/
constructor(message, loc) {
2018-06-04 17:20:43 +08:00
super(message);
this.name = "CommentCompilationWarning";
this.loc = loc;
}
}
2018-10-25 16:47:52 +08:00
makeSerializable(
CommentCompilationWarning,
"webpack/lib/CommentCompilationWarning"
);
2018-06-04 17:20:43 +08:00
module.exports = CommentCompilationWarning;