fix: Fix PostCSS plugin resolution when used in nuxt.config.js

This commit is contained in:
Atinux 2017-11-03 12:31:35 +01:00
parent ac3b3f27a7
commit aa342330d7

View File

@ -137,7 +137,7 @@ export default class Builder {
if (isPureObject(this.options.build.postcss.plugins)) {
this.options.build.postcss.plugins = Object.keys(this.options.build.postcss.plugins)
.map(p => {
const plugin = require(p)
const plugin = require(this.nuxt.resolvePath(p))
const opts = this.options.build.postcss.plugins[p]
if (opts === false) return // Disabled
const instance = plugin(opts)