resolve function which support the browser field in package.json