webpack
Version:
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
30 lines (24 loc) • 993 B
JavaScript
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @alexander-akait
*/
;
const WebpackError = require("./WebpackError");
class UnusedExternalsWarning extends WebpackError {
/**
* Creates an instance of UnusedExternalsWarning.
* @param {string[]} requests the external requests nothing imported
*/
constructor(requests) {
super(
`webpack externals recommendations: \nThe following ${
requests.length === 1 ? "external was" : "externals were"
} declared but never imported: ${requests.join(
", "
)}.\nAn external that nothing requests is usually a typo in the request, or a leftover from a dependency that is now bundled. It also hides a real import behind the wrong name, which then gets bundled instead of staying external.\nFor more info visit https://webpack.js.org/configuration/externals/`
);
/** @type {string} */
this.name = "UnusedExternalsWarning";
}
}
module.exports = UnusedExternalsWarning;