title: Switch reference exception when importing an object
body: <p>I'm at my wits end with this one.  I have an object that's exported (see suffix.js), then imported into a different file (User.js).  When the code runs, I receive an uncaught reference error (see console screenshot).  What kills me is that right before the switch it outputs the value for <code>suffix</code>, the same object that it raises the reference error on.</p>
  <p>suffix.js</p>
  <pre><code>export const SUFFIX_SUCCESS = 'SUCCESS';
  export const SUFFIX_REQUESTED = 'REQUESTED';
  export const SUFFIX_FAILED = 'FAILED';
  
  export default {
    SUFFIX_SUCCESS,
    SUFFIX_REQUESTED,
    SUFFIX_FAILED,
  };
  </code></pre>
  <p>User.js</p>
  <pre><code>import suffix from '../actions/types/suffix';
  import { LOGIN, LOGOUT } from '../actions/types/user';
  import User from '../actions/user';
  import userInitialState from '../initialStates/user';
  
  
  export default (state = userInitialState, action) =&gt; {
    console.log(suffix);
    switch (action.type) {
      case User.read.type(suffix.SUFFIX_SUCCESS):
      case User.update.type(suffix.SUFFIX_SUCCESS):
        return {
          ...state,
          details: action.payload,
        };
  
      case User.delete.type(suffix.SUFFIX_SUCCESS):
        return userInitialState;
      case LOGIN:
        return {
          ...state,
          displayLoginForm: action.isInit ?? false,
        };
      case LOGOUT:
        return {
          ...state,
          details: userInitialState.details,
          logoutReason: action.reason,
          displayLoginForm: true,
        };
      default:
        return state;
    }
  };
  </code></pre>
  <p>Console Output
  <a href="https://i.stack.imgur.com/zviSM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zviSM.png" alt="Console Message" /></a></p>