title: Unable to import reducer from React library npm package (redux)
body: <p>I'm trying to create a React library npm package for import into other modules.</p>
  <p>The package uses redux and the intention is to expose the reducer, so that it can be loaded by the consuming application.</p>
  <p>I've used <code>create-react-library</code> to construct the basic library infrastructure.</p>
  <p>In simplified terms, my structure is as below. The full repo can be seen <a href="https://github.com/MatinF/config-editor-base" rel="nofollow noreferrer">here</a>.</p>
  <p><strong>Library application</strong></p>
  <pre><code>src/
  -- editorBase/
     -- actions.js
     -- Component.js
     -- reducer.js
  -- index.js
  </code></pre>
  <p>My <code>index.js</code> looks as below:</p>
  <pre><code>import EditorSection from './editorBase/EditorSection'
  import editorReducer from './editorBase/reducer'
  
  export {editorReducer}
  export {EditorSection}
  </code></pre>
  <p>My <code>reducer.js</code> looks as below:</p>
  <pre><code>export default = (
    state = {
      ...
    },
    action
  ) =&gt; {
    switch (action.type) {
      case actionsEditor.CONSTANT:
         ...
      case ...:
         ...
      default:
        return state;
    }
  };
  
  </code></pre>
  <hr />
  <p><strong>Consumer application</strong>
  My consuming app's <code>index.js</code> looks as below:</p>
  <pre><code>
  import React from 'react'
  import ReactDOM from 'react-dom'
  import { Provider } from 'react-redux'
  
  import configureStore from './store/configure-store'
  import App from './App'
  
  const store = configureStore()
  
  ReactDOM.render(
    &lt;Provider store={store}&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;,
    document.getElementById('root')
  )
  
  </code></pre>
  <p>My consuming app's <code>reducers.js</code> looks as below:</p>
  <pre><code>import { combineReducers } from &quot;redux&quot;;
  import {editorReducer} from 'config-editor-base'
  
  const rootReducer = combineReducers({
    editorReducer,
  });
  
  export default rootReducer;
  </code></pre>
  <p>My consumer's <code>configure-store.js</code> looks as below:</p>
  <pre><code>import { createStore, applyMiddleware } from &quot;redux&quot;;
  import thunkMiddleware from &quot;redux-thunk&quot;;
  import reducers from &quot;../reducers&quot;;
  
  const createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore);
  
  export default function configureStore(initialState) {
    const store = createStoreWithMiddleware(reducers, initialState);
    return store;
  }
  
  </code></pre>
  <hr />
  <p><strong>The issue</strong>
  When I try to run my consumer application, I get an error which states that variables related to the redux state are undefined. I've verified that if I modify the <code>reducers.js</code> file in the consumer app to use a relative import as below, it works as intended. However, this only works as a 'test' in the react-library-app setup:</p>
  <pre><code>import editor from 'config-editor-base/src/editorBase/reducer'
  </code></pre>
  <p>Any hints are greatly appreciated.</p>