Files
zulip/tools/debug-require.js
Anders Kaseorg b474fa0e37 webpack: Generalize debug-require-webpack-plugin interface.
Now the caller simply imports the debug ‘require’ function as a
module, deciding for itself how to expose it and with what name (in
our case, we expose it as ‘require’ with expose-loader).  Also, remove
a stray console.log.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-02-25 14:01:06 -08:00

12 lines
235 B
JavaScript

/* global __webpack_require__ */
function debugRequire(request) {
return __webpack_require__(debugRequire.ids[request]);
}
debugRequire.initialize = function (ids) {
debugRequire.ids = ids;
};
module.exports = debugRequire;