File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 77 - [ CSS Modules] ( features/css-modules.md )
88 - [ PostCSS] ( features/postcss.md )
99 - [ 热重载] ( features/hot-reload.md )
10+ - [ 函数式组件] ( features/functional.md )
1011- 配置
1112 - [ 预处理器] ( configurations/pre-processors.md )
1213 - [ 资源路径处理] ( configurations/asset-url.md )
2324 - [ preLoaders] ( options.md#preloaders )
2425 - [ postLoaders] ( options.md#postloaders )
2526 - [ postcss] ( options.md#postcss )
27+ - [ postcss.config] ( options.md#postcssconfig )
2628 - [ cssSourceMap] ( options.md#csssourcemap )
2729 - [ esModule] ( options.md#esmodule )
2830 - [ preserveWhitespace] ( options.md#preservewhitespace )
3234 - [ buble] ( options.md#buble )
3335 - [ extractCSS] ( options.md#extractcss )
3436 - [ 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 = {
113113 }
114114 ```
115115
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+
116141### cssSourceMap
117142
118143- 类型: ` Boolean`
@@ -272,3 +297,12 @@ module.exports = {
272297- 默认值: 当 webpack 配置中包含 ` target: 'node'` 且 ` vue-template-compiler` 版本号大于等于 2.4 .0 时为 ` true` 。
273298
274299开启 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', () => {
6565 ' test' : ExampleWithMocks
6666 }
6767 }).$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!' )
6969})
7070```
You can’t perform that action at this time.
0 commit comments