NextJS: How to add nextJS config along withSass plugin?

NextJS: How to add nextJS config along withSass plugin?
0

#1

Hi! To those who use NextJS I have a config file like this:

const withSass = require('@zeit/next-sass');

const nextJsConfig = {
  exportPathMap: function() {
    return {
      '/': { page: '/' }
    }
  }
}

module.exports = withSass({
  webpack(config, options) {
    options.exportPathMap = nextJsConfig.exportPathMap;
    return config;
  }
});

But the configurations doesn’t work. How do you add nextJS configurations to the withSass() plugin?

Thank you campers
:slight_smile:


NextJS: How do you add autoprefixer to NextJS withSass() plugin?
#3

I solved it! =))

const withSass = require('@zeit/next-sass');

const nextJsConfig = {
  exportPathMap: function() {
    return {
      '/': { page: '/' }
    }
  }
}

module.exports = withSass(nextJsConfig);