title: Webpack Dynamic Require
body: <p>I have some modules named using this convention <code>framework-{function}</code> and I require them dynamically.</p>
  
  <pre><code>init(name, options) {
      let plugin = require(`framework-${name}`)(this, options);
      this.registerPlugin(name, plugin);
  }
  </code></pre>
  
  <p>Webpack generates this code when I use development mode in webpack config. It complains <code>Cannot find module framework-db</code> even if it does exist in my <code>node_modules</code>.</p>
  
  <pre><code>/***/ "./node_modules/framework sync recursive ^framework\\-.*$":
  /*!*****************************************************!*\
    !*** ./node_modules/framework sync ^framework\-.*$ ***!
    \*****************************************************/
  /*! no static exports found */
  /***/ (function(module, exports) {
  
      eval("function webpackEmptyContext(req) {\n\tvar e = new Error('Cannot find module \"' + req + '\".');\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = \"./node_modules/framework sync recursive ^framework\\\\-.*$\";\n\n//# sourceURL=webpack:///./node_modules/framework_sync_^framework\\-.*$?");
  
  /***/ }),
  </code></pre>
  
  <p>If I hard code it,</p>
  
  <pre><code>init(name, options) {
      let plugin = require(`framework-db`)(this, options);
      this.registerPlugin(name, plugin);
  }
  </code></pre>
  
  <p>it works.</p>
  
  <p>Any idea how to fix this?</p>