You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
374 B
14 lines
374 B
const getMatchedRules = require('./get-matched-rules');
|
|
|
|
/**
|
|
* Always returns last matched rule
|
|
* @param {string} request
|
|
* @param {Rule[]} rules Webpack loaders config
|
|
* @return {Rule} Webpack rule
|
|
*/
|
|
function getMatchedRule(request, rules) {
|
|
const matched = getMatchedRules(request, rules);
|
|
return matched[matched.length - 1];
|
|
}
|
|
|
|
module.exports = getMatchedRule;
|
|
|