title: Material UI component `theme.spacing` not defined once built
body: <p>I am building a Material-UI text editor using draft.js and wrapping all the functionality in Material-UI components.</p>
  
  <p>I've gotten comfortable using <code>~3.9</code> but for this project decided to update to <code>4.0</code>. Maybe I'm missing something here but this usually works for me with no issues</p>
  
  <pre><code>const styles = theme =&gt; ({
    paper: {
      paddingBottom: theme.spacing(2)
    },
    ...
  })
  
  
  import { withStyles } from "@material-ui/styles"
  ...
  export class EditorComponent extends Component {
    ...
    render() {
      const { classes } = this.props
    }
  }
  
  export default withStyles(styles, { withTheme: true })(EditorComponent)
  </code></pre>
  
  <p>This works while running in a <code>webpack-dev-server</code> but when I build to javascript and attempt to import it into another project and use it I get this error in the console...</p>
  
  <p><code>Uncaught TypeError: theme.spacing is not a function</code></p>
  
  <p>I can't seem to find anything relevant googling this issue.</p>
  
  <p>Here is the repo if looking at my build script would help</p>
  
  <p><a href="https://github.com/jrdn91/material-ui-rte" rel="nofollow noreferrer">https://github.com/jrdn91/material-ui-rte</a></p>