Skip to content

Instantly share code, notes, and snippets.

@Bockit
Created October 29, 2013 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bockit/7208712 to your computer and use it in GitHub Desktop.
Save Bockit/7208712 to your computer and use it in GitHub Desktop.
If two files have the same contents browserify is aliasing one file to the other file, which causes some function equality issues. This is my isolated example.
module.exports = function() {
console.log('I am a function');
}
module.exports = function() {
console.log('I am a function');
}
<html>
<body>
<script src="browserified.js"></script>
</body>
</html>
var a = require('./a')
var b = require('./b')
console.log('a == b (expect false)', a == b);
console.log('a === b (expect false)', a === b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment