You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tree-shaking does not work as expected when using validator.js with modern bundlers (esbuild, webpack, etc). Even when only a single function isEmail is imported, the entire library is included in the bundle. This results in unnecessarily large bundles.
This is caused by the main index.js file, which imports all validator functions and aggregates them into a single default export object. This pattern prevents bundlers from removing unused code, even with "sideEffects": false in package.json.
Examples
If applicable, add screenshots to help explain your problem.
Reproductions
If applicable, provide a reproduction on platforms like runkit