Nuxt.js: Postcss autoprefixer

Created on 4 Jan 2017  路  3Comments  路  Source: nuxt/nuxt.js

Is there a way to extend postcss autoprefixer and add more browser last versions?
Webpack config api schmea doesn't have postcss object or I'm blind?

This question is available on Nuxt.js community (#c84)
question

Most helpful comment

Hi @vadimsg

You should give the build.postcss option directly in your nuxt.config.js:

module.exports = {
  build: {
    postcss: [
      require('autoprefixer')({
        browsers: ['> 5%']
      })
    ]
  }
}

All 3 comments

Hi @vadimsg

You should give the build.postcss option directly in your nuxt.config.js:

module.exports = {
  build: {
    postcss: [
      require('autoprefixer')({
        browsers: ['> 5%']
      })
    ]
  }
}

With the latest RC, this worked for me:

postcss: {
  'postcss-cssnext': {
    browsers: ['last 2 versions', 'ie >= 9']
  }
},

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gary149 picture gary149  路  3Comments

maicong picture maicong  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

surmon-china picture surmon-china  路  3Comments

msudgh picture msudgh  路  3Comments