Different main entry point in package.json for node and browser
问题 In isomorphic react app I have myModule which should behave differently on node and browser environments. I would like configure this split point in package.json for myModule : package.json { "private": true, "name": "myModule", "main": "./myModule.server.js", "browser": "./myModule.client.js" } file structure ├── myModule │ ├── myModule.client.js │ ├── myModule.server.js │ └── package.json │ ├── browser.js └── server.js So when I use myModule in node I should get only myModule.server.js :