From aa342330d7fc6ca9d757792bfd6677184779640c Mon Sep 17 00:00:00 2001 From: Atinux Date: Fri, 3 Nov 2017 12:31:35 +0100 Subject: [PATCH] fix: Fix PostCSS plugin resolution when used in nuxt.config.js --- lib/builder/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/builder/builder.js b/lib/builder/builder.js index b5a51aee9b..91f3a66746 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -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)