mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 05:42:44 +08:00
fix(vant-cli): fixed app cannot HMR when port is not 8080 (#8408)
Co-authored-by: nemo-shen <1034131477@qq.com>
This commit is contained in:
parent
bd4eaf9f8f
commit
df8b2a6d51
@ -21,10 +21,13 @@ function runDevServer(
|
||||
port: number,
|
||||
config: ReturnType<typeof getSiteDevConfig>
|
||||
) {
|
||||
const server = new WebpackDevServer(webpack(config), config.devServer);
|
||||
const server = new WebpackDevServer(webpack(config), {
|
||||
...config.devServer,
|
||||
port,
|
||||
});
|
||||
|
||||
// this is a hack to disable wds status log
|
||||
(server as any).showStatus = function() {};
|
||||
(server as any).showStatus = function () {};
|
||||
|
||||
const host = get(config.devServer, 'host', 'localhost');
|
||||
server.listen(port, host, (err?: Error) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user