New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add default value for browserslist config path #13159
fix: add default value for browserslist config path #13159
Conversation
@@ -179,6 +179,7 @@ export default function getTargets( | |||
options: GetTargetsOption = {}, | |||
): Targets { | |||
let { browsers, esmodules } = inputTargets; | |||
const { configPath = "." } = options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
browserslist
tobrowserslist.loadConfig
, we should add default value forconfigPath
like 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-cli
e2e tests, let's see if CI can be green.