Create a new instance of a custom CSS plugin in NEXT.js

I'm building an app using NEXT.js and I wanted to use this custom CSS plugin in postcss.config.js. I'm following this document in NEXT.js official website. It says that I can't use require() in the postcss.config.js file, but the plugin that I want to use needs to be instantiated using new keyword. I don't know how can I create a instance of this class without using require() to first define it.