Skip to content

Commit 35bcfce

Browse files
committed
only assign global.require once when bootstrapping
1 parent 73cd8aa commit 35bcfce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/cljs/cljs/bootstrap_node.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var CLJS_ROOT = ".";
4949
* The goog namespace in the global scope.
5050
*/
5151
global.goog = {};
52-
52+
global.require = require;
5353

5454
/**
5555
* Imports a script using Node's require() API.
@@ -82,7 +82,6 @@ function nodeGlobalRequire(file) {
8282
var _module = global.module, _exports = global.exports;
8383
global.module = undefined;
8484
global.exports = undefined;
85-
global.require = require;
8685
vm.runInThisContext(fs.readFileSync(file), file);
8786
global.exports = _exports;
8887
global.module = _module;

0 commit comments

Comments
 (0)