Skip to content

refactor: more options for schema #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/loader-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
},
"hmr": {
"type": "boolean"
},
"reloadAll": {
"type": "boolean"
}
}
}
7 changes: 7 additions & 0 deletions test/__snapshots__/validate-loader-options.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ options.publicPath should pass \\"instanceof\\" keyword validation
options.publicPath should match some schema in anyOf
"
`;

exports[`validate options should throw an error on the "reloadAll" option with "1" value 1`] = `
"Mini CSS Extract Plugin Loader Invalid Options

options.reloadAll should be boolean
"
`;
4 changes: 4 additions & 0 deletions test/validate-loader-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ describe('validate options', () => {
success: [true, false],
failure: [1],
},
reloadAll: {
success: [true, false],
failure: [1],
},
unknown: {
success: [],
// TODO failed in next release
Expand Down