fix: require postcss module via resolver (#4737)

This commit is contained in:
Alexander Lichter 2019-01-11 15:09:22 +00:00 committed by Xin Du (Clark)
parent 43d651a96e
commit 4b9e8e75d8

View File

@ -113,7 +113,7 @@ export default class PostcssConfig {
// Map postcss plugins into instances on object mode once // Map postcss plugins into instances on object mode once
config.plugins = this.sortPlugins(config) config.plugins = this.sortPlugins(config)
.map((p) => { .map((p) => {
const plugin = require(p) const plugin = this.nuxt.resolver.requireModule(p)
const opts = plugins[p] const opts = plugins[p]
if (opts === false) { if (opts === false) {
return // Disabled return // Disabled