mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
fix(VantCli): enable Lan access (#5325)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import webpack from 'webpack';
|
||||
import WebpackDevServer from 'webpack-dev-server';
|
||||
import { get } from 'lodash';
|
||||
import { getPort } from 'portfinder';
|
||||
import { siteDevConfig } from '../config/webpack.site.dev';
|
||||
import { sitePrdConfig } from '../config/webpack.site.prd';
|
||||
@@ -20,7 +21,8 @@ function watch() {
|
||||
return;
|
||||
}
|
||||
|
||||
server.listen(port, 'localhost', (err?: Error) => {
|
||||
const host = get(siteDevConfig.devServer, 'host', 'localhost');
|
||||
server.listen(port, host, (err?: Error) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
Reference in New Issue
Block a user