title: Next.js: exportPathMap not found despite having one in next.config.js
body: <p><strong>Error:</strong></p>
  
  <p><code>No "exportPathMap" found in "next.config.js". Generating map from "./pages"</code></p>
  
  <hr>
  
  <p>But I do have <code>exportPathMap</code> based on the <a href="https://nextjs.org/docs#static-html-export" rel="nofollow noreferrer">official docs</a>:</p>
  
  <p>my <code>next.config.js</code> contains:</p>
  
  <pre class="lang-js prettyprint-override"><code>const withCss = require("@zeit/next-css");
  const withSass = require("@zeit/next-sass");
  const withTM = require("next-transpile-modules");
  
  module.exports = {
    exportPathMap: async function(
      defaultPathMap,
      { dev, dir, outDir, distDir, buildId }
    ) {
      return {
        "/": { page: "/" },
        "/menu": { page: "/menu" },
        "/about": { page: "/about" }
      };
    }
  };
  
  module.exports = withCss({
    cssModules: true
  });
  
  module.exports = withSass(
    withTM({
      transpileModules: ["react-bulma-components"],
      sassLoaderOptions: {
        includePaths: ["./components"]
      }
    })
  );
  
  </code></pre>
  
  <p>I have also tried removing the default mappings:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = {
    exportPathMap: async function() {
      return {
        "/": { page: "/" },
        "/menu": { page: "/menu" },
        "/about": { page: "/about" }
      };
    }
  };
  </code></pre>
  
  <p>As well as moving it inside the <code>withCss()</code> based on my research:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = withCss({
    exportPathMap: async function() {
      return {
        "/": { page: "/" },
        "/menu": { page: "/menu" },
        "/about": { page: "/about" }
      };
    }
  });
  </code></pre>
  
  <p>The two exports <code>withSass()</code> and <code>withCss()</code> seems to be working though,
  what did I do wrong?</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>My <code>next.config.js</code> is in the root project directory, if you're by any chance wondering.</p>