   catch e
     throw "require: can't read #{path}"
 
-__modules = {}
+__modules = { loaded : {} }
 __defines = []
 
 

    exports = __modules[__filename] or {}
    module  = exports: exports
    cb.call exports, require, exports, module
    module.exports or exports

exts =

  parts = file.split '.'
  ext   = parts[parts.length-1]

  if __modules[file]?
    if not __modules.loaded[file.toLowerCase()]?
      console.warn("Circular require: #{__filename} required #{file}")
    return __modules[file]
  else if __modules.loaded[file.toLowerCase()]
    console.warn("Mutliple requires (different cases) for #{file}")

  [ previousFilename, window.__filename ] = [ __filename, file ]
  __modules[file] = {} # Fix for circular references
