File tree 3 files changed +38
-1
lines changed
3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 7
7
- [ CSS Modules] ( features/css-modules.md )
8
8
- [ PostCSS] ( features/postcss.md )
9
9
- [ 热重载] ( features/hot-reload.md )
10
+ - [ 函数式组件] ( features/functional.md )
10
11
- 配置
11
12
- [ 预处理器] ( configurations/pre-processors.md )
12
13
- [ 资源路径处理] ( configurations/asset-url.md )
23
24
- [ preLoaders] ( options.md#preloaders )
24
25
- [ postLoaders] ( options.md#postloaders )
25
26
- [ postcss] ( options.md#postcss )
27
+ - [ postcss.config] ( options.md#postcssconfig )
26
28
- [ cssSourceMap] ( options.md#csssourcemap )
27
29
- [ esModule] ( options.md#esmodule )
28
30
- [ preserveWhitespace] ( options.md#preservewhitespace )
32
34
- [ buble] ( options.md#buble )
33
35
- [ extractCSS] ( options.md#extractcss )
34
36
- [ optimizeSSR] ( options.md#optimizessr )
37
+ - [ cacheBusting] ( options.md#cachebusting )
Original file line number Diff line number Diff line change @@ -113,6 +113,31 @@ module.exports = {
113
113
}
114
114
```
115
115
116
+ ### postcss.config
117
+
118
+ > 13.2.1 新增
119
+
120
+ - 类型:` Object `
121
+ - 默认值:` undefined `
122
+
123
+ 这个字段允许用 [ postcss-loader] ( https://github.com/postcss/postcss-loader#config-1 ) 同样的方式自定义 PostCSS 插件。
124
+
125
+ - ** postcss.config.path**
126
+
127
+ 指定一个加载 PostCSS 配置文件的路径 (文件或目录)。
128
+
129
+ ``` js
130
+ postcss: {
131
+ config: {
132
+ path: path .resolve (' ./src' )
133
+ }
134
+ }
135
+ ```
136
+
137
+ - ** postcss .config .ctx **
138
+
139
+ 向 PostCSS 插件提供上下文。详见 [postcss- loader 文档](https: // github.com/postcss/postcss-loader#context-ctx)。
140
+
116
141
### cssSourceMap
117
142
118
143
- 类型: ` Boolean`
@@ -272,3 +297,12 @@ module.exports = {
272
297
- 默认值: 当 webpack 配置中包含 ` target: 'node'` 且 ` vue-template-compiler` 版本号大于等于 2.4 .0 时为 ` true` 。
273
298
274
299
开启 Vue 2.4 服务端渲染的编译优化之后,渲染函数将会把返回的 vdom 树的一部分编译为字符串,以提升服务端渲染的性能。在一些情况下,你可能想要明确的将其关掉,因为该渲染函数只能用于服务端渲染,而不能用于客户端渲染或测试环境。
300
+
301
+ ### cacheBusting
302
+
303
+ > 13.2 .0 新增
304
+
305
+ - 类型:` boolean`
306
+ - 默认值:在开发环境下是 ` true` ,在生产环境下是 ` false` 。
307
+
308
+ 是否通过给文件名后加哈希查询值来避免生成的 source map 被缓存。关掉这一选项有益于 source map 调试。
Original file line number Diff line number Diff line change @@ -65,6 +65,6 @@ it('should render', () => {
65
65
' test' : ExampleWithMocks
66
66
}
67
67
}).$mount ()
68
- expect (vm .$el .querySelector (' .msg' ).textContent ).toBe (' Hello from a mocked service!' )
68
+ expect (vm .$el .querySelector (' .msg' ).textContent ).to . equal (' Hello from a mocked service!' )
69
69
})
70
70
```
You can’t perform that action at this time.
0 commit comments