Skip to content

Commit d6efad8

Browse files
committed
Allow serve property in webpack configuration
The server property is used to configure webpack-serve (https://github.com/webpack-contrib/webpack-serve). Also adapt tests. Fixes webpack#7306
1 parent e449143 commit d6efad8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

schemas/WebpackOptions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,10 @@
16791679
}
16801680
]
16811681
},
1682+
"serve": {
1683+
"description": "Options for webpack-serve",
1684+
"type": "object"
1685+
},
16821686
"stats": {
16831687
"description": "Used by the webpack CLI program to pass stats options.",
16841688
"anyOf": [

test/Validation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe("Validation", () => {
199199
" - configuration has an unknown property 'postcss'. These properties are valid:",
200200
" object { mode?, amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, externals?, " +
201201
"loader?, module?, name?, node?, output?, optimization?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, " +
202-
"recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }",
202+
"recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, serve?, stats?, target?, watch?, watchOptions? }",
203203
" For typos: please correct them.",
204204
" For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.",
205205
" Loaders should be updated to allow passing options via loader options in module.rules.",

0 commit comments

Comments
 (0)