mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
debug: Show what PostCSS configuration is used
This commit is contained in:
parent
42073db289
commit
ac3b3f27a7
@ -1,8 +1,12 @@
|
||||
import _ from 'lodash'
|
||||
import Debug from 'debug'
|
||||
import { join, resolve } from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import { isUrl, isPureObject } from 'utils'
|
||||
|
||||
const debug = Debug('nuxt:build')
|
||||
debug.color = 2 // Force green color
|
||||
|
||||
const Options = {}
|
||||
|
||||
export default Options
|
||||
@ -96,6 +100,7 @@ Options.from = function (_options) {
|
||||
|
||||
// Default postcss options
|
||||
if (postcssConfigPath) {
|
||||
debug(`Using PostCSS config file: ${postcssConfigPath}`)
|
||||
options.build.postcss = {
|
||||
sourceMap: options.build.cssSourceMap,
|
||||
// https://github.com/postcss/postcss-loader/blob/master/lib/index.js#L79
|
||||
@ -104,6 +109,7 @@ Options.from = function (_options) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug('Using PostCSS config from `build.postcss`')
|
||||
// Normalize & Apply default plugins
|
||||
if (Array.isArray(options.build.postcss)) {
|
||||
options.build.postcss = { plugins: options.build.postcss }
|
||||
|
Loading…
Reference in New Issue
Block a user