From 02cf4af16cdfd7a54c9e39df7b1fba0683906357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 12 Jan 2020 17:09:14 +0800 Subject: [PATCH] docs(cli): add webpack config guide --- packages/vant-cli/docs/config.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/vant-cli/docs/config.md b/packages/vant-cli/docs/config.md index 4e3225f36..0a6eca48e 100644 --- a/packages/vant-cli/docs/config.md +++ b/packages/vant-cli/docs/config.md @@ -179,3 +179,15 @@ module.exports = { } }; ``` + +## Webpack + +根目录下的`webpack.config.js`文件会通过 [webpack-merge](https://github.com/survivejs/webpack-merge) 合并到最终的配置中。因此可以灵活地自定义 Webpack 配置,比如修改 devServer 端口: + +```js +module.exports = { + devServer: { + port: 9000 + } +}; +```