UNPKG

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.

32 lines (26 loc) 1.05 kB
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Alexander Akait @alexander-akait */ "use strict"; const WebpackError = require("./WebpackError"); class OsDependentRuleWarning extends WebpackError { /** * Creates an instance of OsDependentRuleWarning. * @param {string[]} rules descriptions of the rules whose paths only match on one operating system */ constructor(rules) { super( `webpack rule recommendations: \nThe following ${ rules.length === 1 ? "condition hardcodes a path separator, so it" : "conditions hardcode a path separator, so they" } only match on one operating system: ${rules.join( ", " )}.\nConditions are matched against native paths, which use '\\' on Windows and '/' elsewhere, so such a rule silently stops matching on the other one. Write '[\\\\/]' to accept both.\nFor more info visit https://webpack.js.org/configuration/module/#condition` ); /** @type {string} */ this.name = "OsDependentRuleWarning"; } } module.exports = OsDependentRuleWarning;