title: Webpack build issue with mobx and mobx-react
body: <p>I have a project that uses React and Mobx with Mobx-react.</p>
  
  <p>My project runs perfectly fine locally. However, when built using <code>webpack -p</code>, I get a blank screen with the following error in the console:</p>
  
  <pre><code>webpack:///./~/mobx-react/index.js?:3 Uncaught Error: Cannot find module "mobx"
      at webpackMissingModule (webpack:///./~/mobx-react/index.js?:3)
      at webpackUniversalModuleDefinition (webpack:///./~/mobx-react/index.js?:3)
      at eval (webpack:///./~/mobx-react/index.js?:10)
      at Object.&lt;anonymous&gt; (bundle.js:18)
      at n (bundle.js:1)
      at eval (webpack:///./src/components/Category.jsx?:35)
      at Object.&lt;anonymous&gt; (bundle.js:27)
      at n (bundle.js:1)
      at eval (webpack:///./src/components/CategoryNavsDates.jsx?:15)
      at Object.&lt;anonymous&gt; (bundle.js:14)
  </code></pre>
  
  <p>Here is my webpack config:</p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const autoprefixer = require('autoprefixer')
  var CopyWebpackPlugin = require('copy-webpack-plugin');
  
  var BUILD_DIR = path.resolve(__dirname, 'build/');
  var SOURCE_DIR = path.resolve(__dirname, 'src/');
  
  module.exports = {
    devtool: 'eval',
    entry: SOURCE_DIR + '/index.jsx',
    output: {
      path: BUILD_DIR,
      filename: 'bundle.js'
    },
  
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
          query: {
            cacheDirectory: true,
            plugins: ['transform-decorators-legacy'],
            presets: ['es2015', 'stage-0', 'react']
          }
        },
        {
          test: /\.css$/,
          use: [
            'style-loader',
            { loader: 'css-loader', options: { modules: true, importLoaders: 1, localIdentName: "[name]__[local]___[hash:base64:3] "} },
            { loader: 'postcss-loader', options: {} },
          ]
        },
      ],
    },
    resolve: {
      extensions: ['.js', '.jsx'],
    },
    plugins: [
      new webpack.LoaderOptionsPlugin({
        options: {
          postcss: function () {
            return [
              require('postcss-import'),
              require('postcss-cssnext'),
            ];
          },
        }
      }),
      new CopyWebpackPlugin([{ from: 'index.html', to: '' },])
    ],
    devServer: {
      historyApiFallback: true
    },
  };
  </code></pre>
  
  <p>There is only one file using Mobx in my entire project, and that is the file the error refers to, <code>Category.jsx</code>.</p>
  
  <p><code>Category.jsx</code> sample:</p>
  
  <pre><code>import { observer } from 'mobx-react'
  import { observable } from 'mobx'
  ...
  @observer class Category extends React.Component {
    @observable showingSmallMenu = false
    ...
  }
  </code></pre>
  
  <p>As I say this all works perfectly fine locally.</p>
  
  <p>What could be the problem here?</p>