Skip to content

Commit

Permalink
fix(loader): #203 support use in rule.oneOf
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #203
  • Loading branch information
constverum authored and kisenka committed Dec 12, 2017
1 parent b9db519 commit cb3d2da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/get-loader-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function getLoaderOptions(loaderPath, rule) {
let options;

if (multiRule) {
options = multiRule.map(normalizeRule).find(r => loaderPath.includes(r.loader)).options;
const rules = [].concat(...multiRule.map(r => (r.use || r)));
options = rules.map(normalizeRule).find(r => loaderPath.includes(r.loader)).options;
} else {
options = normalizeRule(rule).options;
}
Expand Down

0 comments on commit cb3d2da

Please sign in to comment.