andywer / andywer/isomorphic-crypto
Reduce size for browser
Ouverte
enhancement
- Langage dominant
- JavaScript
- Étoiles
- 12
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
1. You should use [Size Limit](https://github.com/ai/size-limit). In this case it will show that browser version will be about 100 KB. In real usage, webpack will find `require('crypto')` and will insert own polyfill even if you already have different `crypto-browserify` polyfill.
2. `if (process.browser)` is a bad way to detect browsers. It inserts 1 KB polyfill. Better to use `"browser"` key in `package.json`. Here is example from `nanoid`: https://github.com/ai/nanoid/blob/116c48d1a2f46ca80f87cd560de9fdc75c454b4c/package.json#L14-L16
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.