_fix(webpack): resolve postcss plugins including package

This commit is contained in:
Pooya Parsa 2020-12-23 00:10:20 +01:00
parent 7b59b21511
commit 4295c6ca26

View File

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