title: Nextjs config file - how to export more content
body: <p>I am trying edit nextjs config file. To use ant design and i18next.<br>
  For ant design i need this.</p>
  
  <pre><code>/* eslint-disable */
  const withCss = require('@zeit/next-css')
  
  
  module.exports = 
  withCss({
    webpack: (config, {
      isServer
    }) =&gt; {
      if (isServer) {
        const antStyles = /antd\/.*?\/style\/css.*?/
        const origExternals = [...config.externals]
        config.externals = [
          (context, request, callback) =&gt; {
            if (request.match(antStyles)) return callback()
            if (typeof origExternals[0] === 'function') {
              origExternals[0](context, request, callback)
            } else {
              callback()
            }
          },
          ...(typeof origExternals[0] === 'function' ? [] : origExternals),
        ]
  
        config.module.rules.unshift({
          test: antStyles,
          use: 'null-loader',
        })
      }
      return config
    },
  })
  </code></pre>
  
  <p>And for i18next i need</p>
  
  <pre><code>module.exports = {
    publicRuntimeConfig: {
      localeSubpaths: typeof process.env.LOCALE_SUBPATHS === 'string'
        ? process.env.LOCALE_SUBPATHS
        : 'none',
    },
  }
  </code></pre>
  
  <p>So i combined it into:</p>
  
  <pre><code>/* eslint-disable */
  const withCss = require('@zeit/next-css')
  
  
  module.exports = ({
    publicRuntimeConfig: {
      localeSubpaths: typeof process.env.LOCALE_SUBPATHS === 'string' ?
        process.env.LOCALE_SUBPATHS : 'none',
    }
  }, withCss({
    webpack: (config, {
      isServer
    }) =&gt; {
      if (isServer) {
        const antStyles = /antd\/.*?\/style\/css.*?/
        const origExternals = [...config.externals]
        config.externals = [
          (context, request, callback) =&gt; {
            if (request.match(antStyles)) return callback()
            if (typeof origExternals[0] === 'function') {
              origExternals[0](context, request, callback)
            } else {
              callback()
            }
          },
          ...(typeof origExternals[0] === 'function' ? [] : origExternals),
        ]
  
        config.module.rules.unshift({
          test: antStyles,
          use: 'null-loader',
        })
      }
      return config
    },
  }))
  </code></pre>
  
  <p>But I am not sure if is it the correct way how to do it because I am still getting an error (ant design works alright and I am trying to import i18next)</p>
  
  <pre><code>D:\xxx\xxx\nextcms\i18n.js:4
  } = require('next/config').default().publicRuntimeConfig
                                      ^
  
  TypeError: Cannot read property 'publicRuntimeConfig' of undefined
  </code></pre>
  
  <p>It can be caused by some other problem but I just need to know if I am correctly exporting those ant design with i18next.</p>
  
  <p>Thank for your time.</p>