rhysclay
rhysclay

Reputation: 1683

next js module.exports sass and static

Im trying to figure out how to setup my next.config.js file to use sass as well as exportPathMap, here is what I have:

module.exports = {
  withSass() {},
  exportPathMap: function() {
    return {
      '/': { page: '/' },
    };
  },
};

But it looks like the withSass() doesnt run, do I need to wrap the exportPathMap with withSass()?

Upvotes: 0

Views: 410

Answers (1)

Fabien Greard
Fabien Greard

Reputation: 1894

I don't know about the exportPathMap part, but withSass should be use like this : (its an HoC)

module.exports = withSass({
  exportPathMap: function() {
    return {
      '/': { page: '/' },
    };
  },
});

Upvotes: 3

Related Questions