mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat: build.autoprefixer option
allows enable/disable or customize autoprefixer closes #1296
This commit is contained in:
parent
e9b66c2e41
commit
1f4dfa5f44
@ -18,13 +18,9 @@ import { styleLoader, extractStyles } from './helpers'
|
||||
export default function webpackBaseConfig ({ isClient, isServer }) {
|
||||
const nodeModulesDir = join(__dirname, '..', 'node_modules')
|
||||
|
||||
/* istanbul ignore if */
|
||||
if (!Array.isArray(this.options.build.postcss)) {
|
||||
this.options.build.postcss = [
|
||||
autoprefixer({
|
||||
browsers: ['last 3 versions']
|
||||
})
|
||||
]
|
||||
// Enable autoprefixer if both autoprefixer postcss are enabled
|
||||
if (this.options.build.autoprefixer && Array.isArray(this.options.build.postcss)) {
|
||||
this.options.build.postcss.push(autoprefixer(this.options.build.autoprefixer))
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -115,7 +115,10 @@ Options.defaults = {
|
||||
vendor: [],
|
||||
plugins: [],
|
||||
babel: {},
|
||||
postcss: undefined,
|
||||
autoprefixer: {
|
||||
browsers: ['last 3 versions']
|
||||
},
|
||||
postcss: [],
|
||||
templates: [],
|
||||
watch: [],
|
||||
devMiddleware: {},
|
||||
|
Loading…
Reference in New Issue
Block a user