title: CodeMirror does not work with React/Webpack
body: <p>I'm working on some markdown editor for my react project.
  I wanna use CodeMirror as the code editor, but it seems it does not working when I build it with webpack.</p>
  
  <p>If be honest, CodeMirror are in the DOM-tree, textArea is hidden, but everything I see is:</p>
  
  <p><a href="https://i.stack.imgur.com/QqzvU.png"><img src="https://i.stack.imgur.com/QqzvU.png" alt="enter image description here"></a></p>
  
  <p>and</p>
  
  <p><a href="https://i.stack.imgur.com/9dfPf.png"><img src="https://i.stack.imgur.com/9dfPf.png" alt="enter image description here"></a></p>
  
  <p>UPD: The same code works perfect on codepen. I guess it's a problem with webpack.</p>
  
  <p>some code:</p>
  
  <p>index.js</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  
  import {Editor} from './components';
  
  const rootElement = document.getElementById('root');
  
  ReactDOM.render(&lt;Editor /&gt;, rootElement);
  </code></pre>
  
  <p>components/editor.js</p>
  
  <pre><code>import React, { Component } from 'react';
  import cm from 'codemirror';
  require('codemirror/mode/markdown/markdown');
  
  export class App extends Component {
    componentDidMount() {
      this.codeMirror = cm.fromTextArea(this.refs.editor, {mode: 'markdown'})
    }
    render() {
      return (
        &lt;div&gt;
          &lt;textarea ref='editor' autoComplete='off' defaultValue='default value' /&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>server.js</p>
  
  <pre><code>var path = require('path');
  var express = require('express');
  var webpack = require('webpack');
  var config = require('./webpack.config.dev');
  
  var HOST = 'localhost';
  var PORT = 3000;
  
  var app = express();
  var compiler = webpack(config);
  
  app.use(require('webpack-dev-middleware')(compiler, {
    noInfo: true,
    publicPath: config.output.publicPath
  }));
  
  
  app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname, '/app/index.html'));
  });
  
  app.listen(PORT, HOST, function(err) {
    if (err) {
      console.log(err);
      return;
    }
  
    console.log('Listening at http://' + HOST + ':' + PORT);
  });
  </code></pre>
  
  <p>and webpack.config.js</p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  
  module.exports = {
    devtool: 'eval',
    entry: [
      'webpack-hot-middleware/client',
      './app/index'
    ],
    output: {
      path: path.join(__dirname, 'dist'),
      filename: 'bundle.js',
      publicPath: '/static/'
    },
    plugins: [
      new webpack.HotModuleReplacementPlugin(),
      new webpack.NoErrorsPlugin()
    ],
    module: {
      loaders: [{
        test: /\.js$/,
        loaders: ['babel'],
        include: path.join(__dirname, 'app')
      }]
    }
  };
  </code></pre>