Doesnt pick browserslist config
Hi,
Browserslist config from package.json is not read.
Thanks, Sinu
There is a $40.00 open bounty on this issue. Add more on Issuehunt.
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
Just stumbled across this issue...
It seems to work fine in my current project though, can't actually reproduce this.
If anyone has this issue, you could use this workaround:
.pipe(gulpAutoprefixer({
browsers: require('./package.json').browserslist
}))
Thanks @simison. I had a similar issue. Your solution works for me.
I was using a .browserslistrc file at the root and it wasn't working. I transitioned my Browserslist config to package.json and implemented it using @simison's code above. 👍
@issuehunt has funded $40.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.
Just verified that I cannot reproduce this as of 2020, browserslist key in package.json and .browserslistrc both get picked up correctly and applied.
When using: .pipe(gulpAutoprefixer({ browsers: require('./package.json').browserslist })) you receive following hint:
Replace Autoprefixer browsers option to Browserslist config.
Use browserslist key in package.json or .browserslistrc file.
Using browsers option can cause errors. Browserslist config
can be used for Babel, Autoprefixer, postcss-normalize and other tools.
If you really need to use option, rename it to overrideBrowserslist.
Learn more at:
https://github.com/browserslist/browserslist#readme
https://twitter.com/browserslist