Skip to content
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
4 changes: 2 additions & 2 deletions lib/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@
},
"OnAfterSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares.",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
},
"OnBeforeSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares.",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
},
"OnListening": {
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/validate-options.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,14 @@ exports[`options validate should throw an error on the "magicHtml" option with '
exports[`options validate should throw an error on the "onAfterSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onAfterSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares.
-> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. Deprecated: please use the 'setupMiddlewares' option.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
`;

exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onBeforeSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares.
-> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. Deprecated: please use the 'setupMiddlewares' option.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
`;

Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/validate-options.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,14 @@ exports[`options validate should throw an error on the "magicHtml" option with '
exports[`options validate should throw an error on the "onAfterSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onAfterSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares.
-> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. Deprecated: please use the 'setupMiddlewares' option.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
`;

exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = `
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.onBeforeSetupMiddleware should be an instance of function.
-> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares.
-> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. Deprecated: please use the 'setupMiddlewares' option.
-> Read more at https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
`;

Expand Down