Skip to content

Commit 96c95a8

Browse files
author
Guillaume Chau
committed
fix(ui): DashboardPlugin ack data
1 parent 31e8c1d commit 96c95a8

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

packages/@vue/cli-service/lib/webpack/DashboardPlugin.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,22 @@ class DashboardPlugin {
7979
}
8080
}
8181

82-
setTimeout(() => {
83-
ipc.disconnect('vue-cli')
84-
}, 4000)
82+
if (sendMessage) {
83+
const ipcTimer = setTimeout(() => {
84+
ipc.disconnect('vue-cli')
85+
}, 15000)
86+
87+
sendMessage({
88+
webpackDashboardDone: true
89+
})
90+
91+
ipc.of['vue-cli'].on('message', data => {
92+
if (data.webpackDashboardAck) {
93+
clearTimeout(ipcTimer)
94+
ipc.disconnect('vue-cli')
95+
}
96+
})
97+
}
8598
}
8699

87100
apply (compiler) {

packages/@vue/cli-service/ui.js

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ module.exports = api => {
1616
for (const data of message.webpackDashboardData.value) {
1717
setSharedData(`${type}-${data.type}`, data.value)
1818
}
19+
} else if (message.webpackDashboardDone) {
20+
api.ipcSend({
21+
webpackDashboardAck: true
22+
})
1923
}
2024
}
2125

0 commit comments

Comments
 (0)