From d6b3535552439edf29bc9c9213df63336cb876cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AE=9D=E6=88=90?= Date: Wed, 2 Mar 2022 15:23:09 +0800 Subject: [PATCH] chore: modify require webpack-hot-client where 'hotClient' in options --- lib/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 4e2a665..909fea0 100644 --- a/lib/client.js +++ b/lib/client.js @@ -8,7 +8,6 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Source Code Form. */ -const webpackHotClient = require('webpack-hot-client'); module.exports = { getClient(compiler, options) { @@ -16,6 +15,8 @@ module.exports = { return Promise.resolve(null); } + const webpackHotClient = require('webpack-hot-client'); + return new Promise((resolve) => { const client = webpackHotClient(compiler, options.hotClient); const { server } = client;