backbone1.js
var backbone1=require('backbone');
window.backbone=backbone1;
backbone2.js
console.log(window.backbone===require('backbone'));
Why is the condition returning false. Shouldn't it return the same object everytime?
Edit:
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<title>Document</title>
</head>
<body>
<script src="bundle1.js"></script><!--backbone1.js gets compiled into bundle1.js-->
<script src="bundle2.js"></script><!--backbone2.js gets compiled into bundle2.js-->
</body>
</html>