Skip to content

Commit

Permalink
fix(devServer): add setup property to devServer options
Browse files Browse the repository at this point in the history
Add missing setup property to devServer options.
See https://webpack.github.io/docs/webpack-dev-server.html#api for setup
option

Close #143
  • Loading branch information
M3lkior authored and Kent C. Dodds committed Dec 2, 2016
1 parent 20ff3d3 commit 0d52fb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.idea/*
.nyc_output/
coverage/
*.log
Expand Down
1 change: 1 addition & 0 deletions src/properties/devServer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default Joi.object({
Joi.array(),
Joi.string(),
],
setup: Joi.func().arity(1),
staticOptions: Joi.object(),
headers: Joi.object(),
})
2 changes: 2 additions & 0 deletions src/properties/devServer/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const validModuleConfigs = [
{ input: { noInfo: true } },
{ input: { proxy: {} } },
{ input: { proxy: [] } },
{ input: { setup: (a) => {} } }, // eslint-disable-line
{ input: { staticOptions: {} } },
{ input: { headers: {} } },
{ input: { localAddress: '1.2.3.4:30' } },
Expand All @@ -53,6 +54,7 @@ const invalidModuleConfigs = [
{ input: { stats: true } },
{ input: { stats: 'foobar' } },
{ input: { proxy: true } },
{ input: { setup: (a, b) => {} } }, // eslint-disable-line
{ input: { localAddress: '1.2.3.4' } },
{ input: { logLevel: 'insane' } },
]
Expand Down

0 comments on commit 0d52fb0

Please sign in to comment.