提交 810acda1 编写于 作者: U ULIVZ

docs: cache option

上级 3871f4a1
......@@ -104,6 +104,25 @@ A function to control what files should have `<link rel="preload">` resource hin
Whether to enable placeholder loading for asynchronous loading content. if it's a stirng, it should be the name of your custom loading component.
### cache
- Type: `boolean|string`
- Default: `true`
VuePress uses [cache-loader](https://github.com/webpack-contrib/cache-loader) by default to greatly speed up the compilation of webpack.
This option can be used to specify the path to the cache, and can also remove the cache before each build by setting it to `false`.
::: tip
This option can also be used through the CLI:
```bash
vuepress dev docs --cache .cache # set cache path
vuepress dev docs --no-cache # remove cache before each build.
```
:::
## Styling
### palette.styl
......
......@@ -102,6 +102,23 @@ module.exports = {
是否对异步加载页面的内容开启占位符加载。如果它是一个字符串,那么它应该是自定义加载组件的名称。
### cache
- Type: `boolean|string`
- Default: `true`
VuePress 默认使用了 [cache-loader](https://github.com/webpack-contrib/cache-loader) 来大大地加快 webpack 的编译速度。
此选项可以用于指定 cache 的路径,同时也可以通过设置为 `false` 来在每次构建之前删除 cache。
::: tip
这个选项也可以通过命令行来使用:
```bash
vuepress dev docs --cache .cache # 设置 cache 路径
vuepress dev docs --no-cache # 在每次构建前删除 cache
```
:::
## Styling
> To be translated.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册