You don't need to define a file mapping, if you define the path of the browser-specific file, it will be used as entry point instead of the one for Node.js defined on "main", so this can be just "browser": "./lib/browser.js".