/ next.config.js
next.config.js
 1  const withSass = require('@zeit/next-sass');
 2  
 3  const dev = process && process.env && process.env.NODE_ENV === 'development';
 4  const subDirPath = dev ? '' : '';
 5  
 6  module.exports =
 7    withSass({
 8      assetPrefix: subDirPath,
 9      exportPathMap: function(defaultPathMap) {
10        return {
11          '/': { page: '/' }
12        }
13      }
14    });
15  
16  module.exports.publicRuntimeConfig = { // Will be available on both server and client
17    subDirPath: subDirPath
18  };