Skip to content

Commit 1ffc393

Browse files
refactor: more options for schema (webpack-contrib#483)
1 parent aa22e44 commit 1ffc393

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/loader-options.json

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
},
1818
"hmr": {
1919
"type": "boolean"
20+
},
21+
"reloadAll": {
22+
"type": "boolean"
2023
}
2124
}
2225
}

test/__snapshots__/validate-loader-options.test.js.snap

+7
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ options.publicPath should pass \\"instanceof\\" keyword validation
2222
options.publicPath should match some schema in anyOf
2323
"
2424
`;
25+
26+
exports[`validate options should throw an error on the "reloadAll" option with "1" value 1`] = `
27+
"Mini CSS Extract Plugin Loader Invalid Options
28+
29+
options.reloadAll should be boolean
30+
"
31+
`;

test/validate-loader-options.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ describe('validate options', () => {
1414
success: [true, false],
1515
failure: [1],
1616
},
17+
reloadAll: {
18+
success: [true, false],
19+
failure: [1],
20+
},
1721
unknown: {
1822
success: [],
1923
// TODO failed in next release

0 commit comments

Comments
 (0)