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

feat!: upgrade to webpack-dev-server v4 #6669

Merged
merged 15 commits into from
Sep 15, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: use webpack-dev-server's built-in open functionality
  • Loading branch information
haoqunjiang committed Sep 14, 2021
commit 334183bdb0474d09c4f0f96d2c3be6fd2fb08bed
12 changes: 1 addition & 11 deletions packages/@vue/cli-service/lib/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const {
error,
hasProjectYarn,
hasProjectPnpm,
openBrowser,
IpcMessenger
} = require('@vue/cli-shared-utils')

Expand Down Expand Up @@ -217,8 +216,7 @@ module.exports = (api, options) => {
...projectDevServerOptions.client
},

// avoid opening browser
open: false,
open: args.open || projectDevServerOptions.open,
setupExitSignals: true,

// eslint-disable-next-line no-shadow
Expand Down Expand Up @@ -319,14 +317,6 @@ module.exports = (api, options) => {
}
console.log()

// fixme: `openPage` is unified into `open`
if (args.open || projectDevServerOptions.open) {
const pageUri = (projectDevServerOptions.openPage && typeof projectDevServerOptions.openPage === 'string')
? projectDevServerOptions.openPage
: ''
openBrowser(localUrlForBrowser + pageUri)
}

// Send final app URL
if (args.dashboard) {
const ipc = new IpcMessenger()
Expand Down