title: Circular references in Webpack build of kurento-client-js
body: <p>I'm facing an error while trying to build kurento-client-js with Webpack 2 + babel.</p>
  
  <pre><code>WARNING in ./node_modules/kurento-client/lib/register.js
  60:20-33 Critical dependency: the request of a dependency is an expression
  </code></pre>
  
  <p>On execution it results in </p>
  
  <pre><code>Uncaught Error: Cannot find module "."
  </code></pre>
  
  <p>I believe that the issue itself is сaused by <code>require</code> inside <code>/lib/register.js</code></p>
  
  <pre><code>//kurento-clinet/lib/register.js
  if (constructor == undefined)
      return register(require(name));
  </code></pre>
  
  <p>And the code that cause errors: </p>
  
  <pre><code>//kurento-clinet/lib/index.js
  //this module requires kurento-client resulting in circular reference
  register('kurento-client-core') 
  </code></pre>
  
  <p>The kurento bower package contains distributive built with the browserify. </p>
  
  <p>I wonder if anyone tried to build <code>kurento-client-js</code> using webpack. Please share your experience.</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Circular dependency error stack trace:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'MediaObject' of undefined
  at Object._typeof (KurentoClient.js:42)
  at __webpack_require__ (bootstrap 0d7eac46304670c5f3b5:19)
  at Object._typeof (index.js:44)
  at __webpack_require__ (bootstrap 0d7eac46304670c5f3b5:19)
  at Object.module.exports (HubPort.js:21)
  at __webpack_require__ (bootstrap 0d7eac46304670c5f3b5:19)
  at Object._typeof (index.js:32)
  at ...
  </code></pre>