Skip to content

Commit 34f4fc1

Browse files
committed
Fixed header and footer to be browser-compatible
Push to 1.5.0
1 parent 9b8c87c commit 34f4fc1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/footer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/********** Footer **********/
2-
module.exports = __require(0);
2+
if(typeof module === "object")
3+
module.exports = __require(0);
4+
else
5+
return __require(0);
36
})();
47
/********** End of footer **********/

lib/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function __require(uid, parentUid) {
1717
// Populate the cache initially with an empty `exports` Object
1818
__modulesCache[uid] = {"exports": {}, "loaded": false};
1919
__moduleIsCached[uid] = true;
20-
if(uid === 0) {
20+
if(uid === 0 && typeof require === "object") {
2121
require.main = __modulesCache[0];
2222
} else {
2323
__modulesCache[uid].parent = __modulesCache[parentUid];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-module-concat",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "Node.js module concatenation library",
55
"main": "index.js",
66
"dependencies": {

0 commit comments

Comments
 (0)