How to combine and use multiple Next.js plugins

前端 未结 1 434
借酒劲吻你
借酒劲吻你 2020-12-03 15:29

I would like to use css and scss in next.jsapp.

I have next.config.js in my project.

This configuration i

相关标签:
1条回答
  • 2020-12-03 15:50

    You can use next-compose-plugins and combine multiple next.js plugins as follows:

    // next.config.js
    const withPlugins = require('next-compose-plugins');
    const withSass = require('@zeit/next-sass');
    const withCSS = require('@zeit/next-css');
    
    module.exports = withPlugins(
      [
        [withSass, { /* plugin config here ... */ }],
        [withCSS,  { /* plugin config here ... */ }],
      ],
      {
        /* global config here ... */
      },
    );
    
    0 讨论(0)
提交回复
热议问题