Added callback support
Fix in package.json for main field when using as a module and added callback support to know when replacement is complete.
Fix in package.json for main field when using as a module and added callback support to know when replacement is complete.