diff --git a/bundler/bundle.js b/bundler/bundle.js index 425ea9cc..0656d05d 100644 --- a/bundler/bundle.js +++ b/bundler/bundle.js @@ -73,7 +73,8 @@ module.exports = function(input, output, options) { function fixCollisions(code) { for (var variable in usedVariables) { - var collision = new RegExp("([^\\.])" + variable + "\\b(?![\"'`])", "g") + var collision = new RegExp("([^\\.])\\b" + variable + "\\b(?![\"'`])", "g") + // var collision = new RegExp("([^\\.])" + variable + "\\b(?![\"'`])", "g") var exported = new RegExp("module\\.exports\\s*=\\s*" + variable) if (collision.test(code) && !exported.test(code) && !globals[variable.match(/[^\.]+/)]) { var fixed = variable + usedVariables[variable]++