Skip to content

Commit 3f5a60a

Browse files
committed
add comments
1 parent f824c72 commit 3f5a60a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/cljs/cljs/bootstrap_nodejs.js

+3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ function nodeGlobalRequire(file) {
112112
_exports = global.exports,
113113
exportedRequire = false;
114114

115+
// to circumvent Node.js environment detection in bundled libraries
115116
global.module = undefined;
116117
global.exports = undefined;
117118

119+
// to allow requires of Node.js libraries (i.e. platform libs) that
120+
// couldn't be bundled for some reason
118121
if(global.require == undefined) {
119122
exportedRequire = true;
120123
global.require = require;

0 commit comments

Comments
 (0)