fix: add default value for browserslist config path#13159
Conversation
| options: GetTargetsOption = {}, | ||
| ): Targets { | ||
| let { browsers, esmodules } = inputTargets; | ||
| const { configPath = "." } = options; |
There was a problem hiding this comment.
Unlike browserslist, we use "." instead of path.resolve(".") here to avoid import "path" so we don't have to add a packageJson.browsers field for this package.
browserslist will use path.resolve when it is running in a Node environment:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/45227/ |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2998625:
|
|
Thanks for the fix. |
|
There have been a few fixes on |
|
Thank you so much! |
Thanks to investigations from @sodatea (#13154 (comment)), the vue-cli e2e error caught a regression introduced in #12189. When we switched from
browserslisttobrowserslist.loadConfig, we should add default value forconfigPathlike browserslist did here: https://github.com/browserslist/browserslist/blob/98d5352e06/index.js#L406-L408I have added new tests on unspecified
configPath.Disclaimer: I didn't run
vue-clie2e tests, let's see if CI can be green.