fix: warn when using array postcss configuration (#4936)

This commit is contained in:
Alexander Lichter 2019-02-03 22:21:51 +00:00 committed by Pooya Parsa
parent efc2880829
commit 422155ea14

View File

@ -1,5 +1,6 @@
import fs from 'fs'
import path from 'path'
import consola from 'consola'
import defaults from 'lodash/defaults'
import merge from 'lodash/merge'
import cloneDeep from 'lodash/cloneDeep'
@ -93,7 +94,10 @@ export default class PostcssConfig {
}
normalize(config) {
// TODO: Remove in Nuxt 3
if (Array.isArray(config)) {
consola.warn('Using an Array as `build.postcss` will be deprecated in Nuxt 3. Please switch to the object' +
' declaration')
config = { plugins: config }
}
return config