Comparing version 1.1.4 to 1.2.0
{ | ||
"name": "esm-env", | ||
"version": "1.1.4", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/benmccann/esm-env.git" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/benmccann/esm-env", | ||
"author": "Ben McCann (https://www.benmccann.com)", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"browser": { | ||
"node": { | ||
"development": "./browser-dev-node.js", | ||
"default": "./browser-node.js" | ||
}, | ||
"default": { | ||
"development": "./browser-dev.js", | ||
"default": "./browser.js" | ||
} | ||
}, | ||
"default": { | ||
"node": { | ||
"development": "./dev-node.js", | ||
"default": "./node.js" | ||
}, | ||
"default": { | ||
"development": "./dev.js", | ||
"default": "./none.js" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
"name": "esm-env", | ||
"version": "1.2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/benmccann/esm-env.git" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/benmccann/esm-env", | ||
"author": "Ben McCann (https://www.benmccann.com)", | ||
"type": "module", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"./browser": { | ||
"browser": "./true.js", | ||
"default": "./false.js" | ||
}, | ||
"./development": { | ||
"development": "./true.js", | ||
"production": "./false.js", | ||
"default": "./dev-fallback.js" | ||
}, | ||
"./node": { | ||
"node": "./true.js", | ||
"default": "./false.js" | ||
} | ||
} | ||
} |
@@ -13,4 +13,16 @@ # esm-env | ||
Specify `conditions` in your bundler or runtime. For example: | ||
- [Node.js](https://nodejs.org/api/cli.html#-c-condition---conditionscondition) | ||
- [Bun](https://bun.sh/docs/runtime/modules#custom-conditions) | ||
- [Vite/Vitest](https://vite.dev/config/shared-options#resolve-conditions) | ||
- [webpack](https://webpack.js.org/configuration/resolve/#resolveconditionnames) | ||
If `esm-env` is used in both bundled code and an externalized library, you will need to specify conditions both at build-time and run-time. | ||
## Acknowledgements | ||
Thank you to [dominikg](https://github.com/dominikg) for refining the approach used by this library to suggest a more scalable method for adding additional conditions. | ||
## License | ||
[MIT](LICENSE) |
Sorry, the diff of this file is not supported yet
4099
28
9
20