skip over undefined properties in rules
see regression https://github.com/webpack/webpack/issues/8537#issuecomment-508451734
This commit is contained in:
parent
0661230d07
commit
44f812b66a
|
@ -140,7 +140,9 @@ class RuleSetCompiler {
|
|||
* @returns {CompiledRule} normalized and compiled rule for processing
|
||||
*/
|
||||
compileRule(path, rule, refs) {
|
||||
const unhandledProperties = new Set(Object.keys(rule));
|
||||
const unhandledProperties = new Set(
|
||||
Object.keys(rule).filter(key => rule[key] !== undefined)
|
||||
);
|
||||
|
||||
/** @type {CompiledRule} */
|
||||
const compiledRule = {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
it("compile fine", () => {});
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: undefined,
|
||||
loader: undefined,
|
||||
use: undefined,
|
||||
options: undefined,
|
||||
resource: undefined
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue