Closed felixoi closed 3 years ago
Actually works when using this config and not require:
module.exports = {
plugins: {
'autoprefixer': true
}
};
@felixoi I not 100% sure I get want you are trying to achieve here and since the issue seems to be fixed when using 'plugin object notation' can this issue be closed?
Yes, sorry. Forgot this one.
I am having a setup where the nodejs modules are installed in a different directory. This ends up in using a relative path like
which is totally stupid since I have to staticly bind a dynamically changing folder. The problem with this is that the
postcss.config.js
is sometimes called from different base directories, so__dirname
changes which ends up in modules are not found. This would be fixes when using theresolve.modules
property from webpack since it always has the same base. In my case it's configured likeWith this I could just do
require('autoprefixer')
and it would automatically use the configured directory to find the node modules. Since most postcss plugins are nodejs modules it would be very helpful.