Skip to content

Commit 0d52fb0

Browse files
M3lkiorKent C. Dodds
authored and
Kent C. Dodds
committed
fix(devServer): add setup property to devServer options
Add missing setup property to devServer options. See https://webpack.github.io/docs/webpack-dev-server.html#api for setup option Close #143
1 parent 20ff3d3 commit 0d52fb0

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
.idea/*
23
.nyc_output/
34
coverage/
45
*.log

src/properties/devServer/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default Joi.object({
4646
Joi.array(),
4747
Joi.string(),
4848
],
49+
setup: Joi.func().arity(1),
4950
staticOptions: Joi.object(),
5051
headers: Joi.object(),
5152
})

src/properties/devServer/index.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const validModuleConfigs = [
4040
{ input: { noInfo: true } },
4141
{ input: { proxy: {} } },
4242
{ input: { proxy: [] } },
43+
{ input: { setup: (a) => {} } }, // eslint-disable-line
4344
{ input: { staticOptions: {} } },
4445
{ input: { headers: {} } },
4546
{ input: { localAddress: '1.2.3.4:30' } },
@@ -53,6 +54,7 @@ const invalidModuleConfigs = [
5354
{ input: { stats: true } },
5455
{ input: { stats: 'foobar' } },
5556
{ input: { proxy: true } },
57+
{ input: { setup: (a, b) => {} } }, // eslint-disable-line
5658
{ input: { localAddress: '1.2.3.4' } },
5759
{ input: { logLevel: 'insane' } },
5860
]

0 commit comments

Comments
 (0)