File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -337,11 +337,28 @@ You can configure the service port using the `--port` parameter.
337337
338338` ` ` bash
339339$ win preview --port 9527
340+
341+ # specify hostname
342+ win preview --host [host]
343+
344+ # specify port
345+ win preview --port [port]
346+
347+ # specify build directory
348+ win preview --dir [dir]
349+
350+ # specify url prefix
351+ win preview --prefix [prefix]
352+
353+ # access path: http://localhost:4172/boilerplate
340354` ` `
341355
342356Now the ` preview` command will run the server at http://127.0.0.1:9527.
343357
344358Use the ` --host` parameter to specify the hostname for the service.
359+ Use the ` --port` parameter to specify the port for the service.
360+ Use the ` --dir` parameter to specify the build output directory, defaults to dist.
361+ Use the ` --prefix` parameter to allow custom URL prefix, defaults to ` base` in the configuration file.
345362
346363The following user configurations will also take effect during ` preview` :
347364
Original file line number Diff line number Diff line change @@ -337,11 +337,28 @@ $ win plugin list
337337
338338` ` ` bash
339339$ win preview --port 9527
340+
341+ # specify hostname
342+ win preview --host [host]
343+
344+ # specify port
345+ win preview --port [port]
346+
347+ # specify build directory
348+ win preview --dir [dir]
349+
350+ # specify url prefix
351+ win preview --prefix [prefix]
352+
353+ # access path:http://localhost:4172/boilerplate
340354` ` `
341355
342356现在 ` preview` 命令会将服务器运行在 http://127.0.0.1:9527.
343357
344358通过 ` --host` 参数来指定 配置服务运行的 hostname。
359+ 通过 ` --port` 参数来指定 配置服务运行的 port。
360+ 通过 ` --dir` 参数来指定构建后的输出目录,默认为 dist。
361+ 通过 ` --prefix` 参数来允许自定义 URL 前缀,默认为配置文件里的 ` base` 。
345362
346363以下用户配置在 ` preview` 时也会生效
347364
You can’t perform that action at this time.
0 commit comments