gulp-autoprefixer icon indicating copy to clipboard operation
gulp-autoprefixer copied to clipboard

Doesnt pick browserslist config

Open sinujohn91 opened this issue 8 years ago • 6 comments

Issuehunt badges

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.

sinujohn91 avatar Dec 28 '16 06:12 sinujohn91

Just stumbled across this issue...

It seems to work fine in my current project though, can't actually reproduce this.

thomasmattheussen avatar Feb 06 '17 14:02 thomasmattheussen

If anyone has this issue, you could use this workaround:

.pipe(gulpAutoprefixer({
  browsers: require('./package.json').browserslist
}))

simison avatar May 04 '17 13:05 simison

Thanks @simison. I had a similar issue. Your solution works for me.

jongc avatar Apr 16 '18 20:04 jongc

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. 👍

adamjohnson avatar Sep 13 '18 15:09 adamjohnson

@issuehunt has funded $40.00 to this issue.


IssueHuntBot avatar Apr 11 '19 12:04 IssueHuntBot

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

mcmxcdev avatar Nov 14 '20 11:11 mcmxcdev