Skip to content

Commit 5a900ff

Browse files
committed
fix(vite): avoid error stop when vite restart
1 parent 0093a0a commit 5a900ff

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/index.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ export const unpluginFactory: UnpluginFactory<Options> = options => ({
109109
}
110110
}
111111
},
112-
async buildEnd() {
113-
// https://github.com/vitejs/vite/commit/4338d7d6f32c8e0e67ff58f0cb8c1a9120294756#diff-c0b6eb176448702b6325d2e1b2567c5ccf969f03eef1242950e0bfb18877022fR580
114-
_stop && await _stop()
115-
},
116112
},
117113
webpack(compiler) {
118114
const {
@@ -127,14 +123,14 @@ export const unpluginFactory: UnpluginFactory<Options> = options => ({
127123
}
128124

129125
try {
130-
registerExit(async () => {
131-
try {
132-
_stop && await _stop()
133-
}
134-
catch (e) {
135-
consola.error(e)
136-
}
137-
})
126+
// registerExit(async () => {
127+
// try {
128+
// _stop && await _stop()
129+
// }
130+
// catch (e) {
131+
// consola.error(e)
132+
// }
133+
// })
138134

139135
const devServer = {
140136
host: '127.0.0.1',

0 commit comments

Comments
 (0)