title: How to use select2 with webpack?
body: <p>I've downloaded <code>select2</code> as node module by:</p>
  
  <pre><code>npm install select2
  </code></pre>
  
  <p>and included it in my <code>app.js</code>:</p>
  
  <pre><code>require('select2')($);
  </code></pre>
  
  <p><hr>
  When I run <code>webpack</code> there are no errors, but when I open the app I get:</p>
  
  <pre><code>Uncaught TypeError: Object.defineProperty called on non-object(…)
  </code></pre>
  
  <p>coming from <code>select2.js</code>:</p>
  
  <pre><code>S2.define('select2/core',[
    'jquery',
    './options',
    './utils',
    './keys'
  ], function ($, Options, Utils, KEYS) {
  (...)
  }
  </code></pre>
  
  <p>Does it happen because module wrapper for <code>select2</code> works only with AMD and is incompatible with CommonJS?</p>