Skip to content
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

fix: upgrade webpack-serve and avoid port conflict #425

Merged
merged 3 commits into from
May 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 4 additions & 1 deletion lib/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
compiler,
host,
dev: { logLevel: 'warn' },
hot: { logLevel: 'error' },
hot: {
port: parseInt(port) + 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

portfinder.getPortPromise will return number, so parseInt is unnecessary here.

logLevel: 'error'
},
logLevel: 'error',
port,
add: app => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"webpack": "^4.8.1",
"webpack-chain": "^4.6.0",
"webpack-merge": "^4.1.2",
"webpack-serve": "^0.3.1",
"webpack-serve": "0.3.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget ^

"webpackbar": "^2.6.1",
"workbox-build": "^3.1.0"
},
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7437,9 +7437,9 @@ webpack-merge@^4.1.2:
dependencies:
lodash "^4.17.5"

webpack-serve@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/webpack-serve/-/webpack-serve-0.3.1.tgz#a91a99d013a70d2c15df2d12c5d31a8842c033ba"
[email protected].2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/webpack-serve/-/webpack-serve-0.3.2.tgz#9cfd823dd570438d8cf362e70586bc54af1f0c92"
dependencies:
"@shellscape/koa-static" "^4.0.4"
chalk "^2.3.0"
Expand Down