![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
esm-env-robust
Advanced tools
Like [esm-env](https://github.com/benmccann/esm-env), uses export conditions to return environment information in a way that works with major bundlers and runtimes, but this project is also 'robust' in the sense it have also a fallback bahaviour for olde
Like esm-env, uses export conditions to return environment information in a way that works with major bundlers and runtimes,
but this project is also 'robust' in the sense it have also a fallback bahaviour for older environments that doesn't support
the exports
fields in package.json
.
This project was motivated to solve issue esm-env#1, but works for wider audience.
Demo of fallback in old environment: https://svelte.dev/repl/6ae4871d6a48460fb8be28afaf9a6e1d?version=3.54.0
npm install esm-env-robust
. import { BROWSER } from 'esm-env-robust';
DEV
will be false
, use:import { DEV, BROWSER } from 'esm-env-robust/dev-fallback-false';
DEV
will be true
, use:import { DEV, BROWSER } from 'esm-env-robust/dev-fallback-true';
If you don't care about fallback behaviour for older environments at all, consider using the basic esm-env package instead.
BROWSER
The fallback value of BROWSER
is set up on runtime by checking the value of typeof window
.
Currently, code minification tools, as far as we know, don't optimize this value to compile time.
That means you enjoy the most of both worlds by using this package - on updated environments you'll get the correct value on compile time, and on older environments you'll get the correct value on runtime (better than nothing).
FAQs
Like [esm-env](https://github.com/benmccann/esm-env), uses export conditions to return environment information in a way that works with major bundlers and runtimes, but this project is also 'robust' in the sense it have also a fallback bahaviour for olde
The npm package esm-env-robust receives a total of 2,409 weekly downloads. As such, esm-env-robust popularity was classified as popular.
We found that esm-env-robust demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.