mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 11:03:54 +00:00
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>
This commit is contained in:
committed by
Tim Abbott
parent
60b5d372f9
commit
b474fa0e37
11
tools/debug-require.js
Normal file
11
tools/debug-require.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/* global __webpack_require__ */
|
||||
|
||||
function debugRequire(request) {
|
||||
return __webpack_require__(debugRequire.ids[request]);
|
||||
}
|
||||
|
||||
debugRequire.initialize = function (ids) {
|
||||
debugRequire.ids = ids;
|
||||
};
|
||||
|
||||
module.exports = debugRequire;
|
||||
Reference in New Issue
Block a user