title: How to shim tinymce in webpack?
body: <p>I'm trying to get <a href="https://www.npmjs.com/package/tinymce">tinymce</a> recognized by webpack. It sets a property named <code>tinymce</code> on <code>window</code>, so evidently one option is to <code>require()</code> it using syntax like this (described at the bottom of the <a href="http://webpack.github.io/docs/shimming-modules.html#exporting">EXPORTING section</a> of the webpack docs):</p>
  
  <p><code>require("imports?window=&gt;{}!exports?window.XModule!./file.js</code></p>
  
  <p>But in this example, how is <code>./file.js</code> resolved? I installed tinymce via npm, and I can't figure out how to specify the right path to the <code>tinymce.js</code> file.</p>
  
  <p>Regardless, I'd rather handle this in my configuration and be able to just <code>require('tinymce')</code> if possible, so I've installed <code>exports-loader</code> and added the following to my configuration (based on <a href="https://github.com/webpack/webpack/issues/192">this discussion</a>):</p>
  
  <pre><code>module: {
      loaders: [
          {
              test: /[\/]tinymce\.js$/,
              loader: 'exports?tinymce'
          }
      ]
  }
  </code></pre>
  
  <p>Unfortunately this isn't working. What's wrong with my configuration?</p>