title: Cannot assign to read only property 'exports' of object ERROR after upgrading to Babel 7
body: <p>Getting the following error after upgrading to Babel 7 in my react app.
  Let me know if I need to include more details! </p>
  
  <p>I've tried the solution of replacing <code>module.exports</code> with <code>export default</code> but that brings other errors. </p>
  
  <p>Error:</p>
  
  <pre><code>module.exports = {
  ^
  
  TypeError: Cannot assign to read only property 'exports' of object '#&lt;Object&gt;'
  
    23 | const host = process.env.RAZZLE_HOST || `http://localhost:${port}`;
    24 | 
  &gt; 25 | module.exports = {
    26 |   port,
    27 |   host,
    28 |   isAdminSite,
  </code></pre>
  
  <p>config.js context:</p>
  
  <pre><code>const host = process.env.RAZZLE_HOST || `http://localhost:${port}`;
  
  module.exports = {
    port,
    host,
    isAdminSite,
    adminSiteUrl,
    userSiteUrl,
  </code></pre>
  
  <p>Imported like:</p>
  
  <pre><code>import _ from 'lodash';
  import moment from 'moment-timezone';
  import splitLinks from '../helpers/split-links';
  import { host } from '../config';
  import MatchView from './match_view';```
  </code></pre>