Closed DamienRobert closed 6 years ago
Yeap. path
is correct.
@DamienRobert note that tests were failed
Hum I need to update the code to only pass '{path: from}' when it is well defined. Indeed browserslist fallback to '.' is as follow:
if (!opts.hasOwnProperty('path')) {
opts.path = path.resolve ? path.resolve('.') : '.'
}
so passing a undefined 'path' prevents the fallback.
Edit: I updated the PR
I pushed a new commit to let the cli be able to work with a .browserslistrc rather than defaulting always to browserslist.defaults.
@DamienRobert it is awesome work! Bu the way, maybe you want to have a popular open source project and want to maintain this awesome project? Current maintainer is looking for the replacement. And this project is the best way to get experience since I will help here.
Thanks for merging this!
@ai: unfortunately I really don't have time to help maintain a project right now, sorry!
Commit a1bf895ecd48b5c4ba8e82227da3c33aaafc3a48 changed the browserslist request from browserslist(this.browsersRequest) to browserslist(this.browsersRequest, { from })
But in browserslist the option name for the path is 'path'. This commit corrects this. Note that this means that before, since 'path' was not specified, browserslist would fallback to the current working directory for the config file look up.
With this commit, if no queries are specified, browserslist will look up for a config file up from the specified path rather than the current working directory. This conforms with autoprefixer behavior.