'What is the Right Way of using plugins in PostCSS configuration file?

How do we import plugins in PostCSS? Most of the articles I found online is using the following syntax:

module.exports = {
   plugins: [
     require('<plugin_1>'),
     require('<plugin_2>')
  ]
}

But, in some articles like in Tailwind 3 setup guide, the syntax they uses is something like this:

module.exports = {
  plugins: {
    <plugin_1>: {},
    <plugin_2>: {},
  }
}

So, as a beginner, I'm confused! Which one should I use? Moreover, if you have any articles explaining how PostCSS is configured, Can you share the link with me!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source