diff --git a/docs/config-detail.md b/docs/config-detail.md index 9d2f82107f30..d85cd91fb433 100644 --- a/docs/config-detail.md +++ b/docs/config-detail.md @@ -1417,7 +1417,7 @@ module.exports = { `object` -配置 `postcss` 相关插件。 + `postcss` 相关配置,其他样式语言预处理后经过此配置。 ```js module.exports = { @@ -1425,17 +1425,15 @@ module.exports = { rn: { // ... postcss: { - // 可以进行 options 的配置。配置项参考官方文档 https://github.com/postcss/postcss#options - options: {}, - // 默认true,控制是否对 css value 进行 scalePx2dp 转换 - scalable: true, - // 可以进行 `pxtransform` 的配置。配置项参考官方文档 https://github.com/NervJS/taro/tree/master/packages/postcss-pxtransform + // postcss 配置,参考 https://github.com/postcss/postcss#options + options: { /* ... */ }, + // 默认true,控制是否对 css value 进行 scalePx2dp 转换,pxtransform配置 enable 才生效 + scalable: boolean, pxtransform: { - // 默认true - enable: true, - config: {} + enable: boolean, // 默认true + config: { /* ... */ } // 插件 pxtransform 配置项,参考尺寸章节 }, - } + }, } } ``` @@ -1444,18 +1442,18 @@ module.exports = { `object` -配置 `sass`相关插件 + `sass` 相关配置。`options` 配置项参考[官方文档](https://github.com/sass/node-sass#options)。 ```js module.exports = { // ... rn: { + // ... sass: { - // 可以进行 options 的配置。配置项参考官方文档 https://github.com/sass/node-sass#options - options: {}, - // 加入到脚本注入的每个 sass 文件头部,在 config.sass 之前 - additionalData: '', - }, + options: { /* ... */ }, + // 加入到脚本注入的每个 sass 文件头部,在 config.sass 之前 + additionalData: '', // {String|Function} + } } } ``` @@ -1464,17 +1462,17 @@ module.exports = { `object` -配置 `less`相关插件 +`less` 相关配置。`options` 配置项参考[官方文档](http://lesscss.org/usage/#less-options)。 ```js module.exports = { // ... rn: { + // ... less: { - // 可以进行 options 的配置。配置项参考官方文档 http://lesscss.org/usage/#less-options - options: {}, - additionalData: '', - }, + options: { /* ... */ }, + additionalData: '', // {String|Function} + } } } ``` @@ -1483,18 +1481,17 @@ module.exports = { `object` -配置 `stylus`相关插件 + `stylus` 相关配置。`stylus.options` 配置项参考[文档](https://github.com/NervJS/taro/tree/next/packages/taro-rn-style-transformer/README.md#rnstylus)。 ```js module.exports = { // ... rn: { + // ... stylus: { - // 可以进行 options 的配置。配置项参考官方文档 https://stylus-lang.com/docs/js.html - options: {}, - additionalData: '', - }, + options: { /* ... */ }, + additionalData: '', // {String|Function} + } } } ``` -