DEV Community

Abu Sayem Md Habibullah
Abu Sayem Md Habibullah

Posted on

How to use the multi plugin in your next.js application

I saw many of them have problems to use multi plugins in next.js configuration file, I mean next.config.js file.

You can use official (next-compose-plugins) to wraps your all plugins and look at all plugins documentation below the link:
https://github.com/zeit/next-plugins

Also, you can try this, it's working properly.

// In your next.config.js file
const withPlugins = require('next-compose-plugins');
const withCSS = require("@zeit/next-css");
const withSass = require('@zeit/next-sass')
const withImages = require('next-images')

module.exports = withPlugins([
[withCSS(withSass())],
[withImages],
])

Top comments (0)