I have project setup with Lerna and Yarn Workspaces:
packages/a/package.json
packages/a/.browserslistrc
packages/a/...
packages/b/package.json
packages/b/.browserslistrc
packages/b/...
package.json
.browserslistrc
In the root .browserslistrc file I have browsers list and in each package .browserslistrc file I would like to do
extends ../../.browserslistrc
but I can't. I can only extend from package like here:
extends @org/browserslist-config-mycompany
However, I don't want to create separate package to only define list of browsers
Browserslist can鈥檛 to it right now because of security concerns.
What is the purpose for packages/a/.browserslistrc? Does it extends .browserslistrc from the root?
Hmm security concerns? Isn't it just something similar to other tools that allow extending config files?
Yep the one in packages/a extends the one in the root
Isn't it just something similar to other tools that allow extending config files?
I am not sure that other tools are secure ;)
Yep the one in packages/a extends the one in the root
You can create packages/our-browserslist-config, add it to workspaces and then use as extend our-browserslist-config. Will it work for you?
I think I've tried it already and it didn't work but I will try again and let you know
I opened an issue here to add json js and ts support for config files. That would solve the extension problem automatically as described in this article.
Most helpful comment
I opened an issue here to add json js and ts support for config files. That would solve the extension problem automatically as described in this article.