From 86041098bf24d26e9a4d1ff58ee5d61383ed56ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C4=81rlis=20Ga=C5=86=C4=A3is?= Date: Thu, 16 Mar 2023 11:00:48 +0200 Subject: [PATCH 1/2] docs: fix default value of config (#626) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bf1610e5..e00a077b 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,9 @@ There is the special `config` option for config files. How it works and how it c We recommend do not specify `from`, `to` and `map` options, because this can lead to wrong path in source maps. If you need source maps please use the [`sourcemap`](#sourcemap) option. +To optimize performance of the loader, it is better to provide `postcssOptions` in loader config and specify `config: false`. +This approach removes the need to lookup and load external config files multiple times during compilation. + #### `object` Setup `plugins`: @@ -405,7 +408,7 @@ Type: type config = boolean | string; ``` -Default: `undefined` +Default: `true` Allows to set options using config files. Options specified in the config file are combined with options passed to the loader, the loader options overwrite options from config. From 5bc8e8b12bc3a0406dd52255767a1ad552f6434c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C4=81rlis=20Ga=C5=86=C4=A3is?= Date: Thu, 16 Mar 2023 11:05:49 +0200 Subject: [PATCH 2/2] docs: clarify performance note --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e00a077b..b32e62a4 100644 --- a/README.md +++ b/README.md @@ -222,8 +222,9 @@ There is the special `config` option for config files. How it works and how it c We recommend do not specify `from`, `to` and `map` options, because this can lead to wrong path in source maps. If you need source maps please use the [`sourcemap`](#sourcemap) option. -To optimize performance of the loader, it is better to provide `postcssOptions` in loader config and specify `config: false`. -This approach removes the need to lookup and load external config files multiple times during compilation. +For large projects, to optimize performance of the loader, it is better to provide `postcssOptions` in loader +config and specify `config: false`. This approach removes the need to lookup and load external config files multiple +times during compilation. #### `object`