title: Next JS config multiple plugin configuration
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const {
    DEVELOPMENT_SERVER,
    PRODUCTION_BUILD
  } = require("next/constants");
  
  require('dotenv').config()
  
  const path = require('path')
  const Dotenv = require('dotenv-webpack')
  
  const nextConfig = {
    webpack: config =&gt; ({ ...config, node: { fs: "empty" } })
  };
  module.exports = phase =&gt; {
    if (phase === DEVELOPMENT_SERVER || phase === PRODUCTION_BUILD) {
      const withCSS = require("@zeit/next-css");
      return withCSS(nextConfig);
    }
    return nextConfig;
  };
  *module.exports =  {
    webpack: (config) =&gt; {
      config.plugins = config.plugins || []
      config.plugins = [
        ...config.plugins,
        // Read the .env file
        new Dotenv({
          path: path.join(__dirname, '.env'),
          systemvars: true
        })
      ]
      return config
    }
  }*
  
  let prefix;
  switch (process.env.NODE_ENV) {
    case "test":
      prefix = "https://test.domain.com/providers";
      break;
    case "stage":
      prefix = "https://state.domain.com/providers";
      break;
    case "production":
      prefix = "https://production.domain.com/providers";
      break;
    default:
      prefix = "";
      break;
  }
  module.exports = {
    distDir: "build",
    assetPrefix: prefix
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here my next.config.js configuration.
  But when I am trying to run then getting the message like 
  Error! Network error: Unexpected token N in JSON at position 0</p>
  
  <p>But when I am trying to run whatever into the bold(*) and kept only that thing into the next.config.js then working fine.
  How to configure multiple plugin into the module.export</p>