fix: split validators.ts into multiple files to allow proper tree shaking #519
Labels
status: done/released
Issue has been completed, no further action is needed.
type: fix
Issues describing a broken feature.
In validators.ts, line 20-22:
When
class-validator
is bundled with webpack,google-libphonenumber
, which represents 71% of the bundle size, is embedded, even if you don't use the phone number validator. See this bundle analysis made with webpack-bundle-analyzer:Validators should be split into different files, allowing to import only the needed files without extra code and thus enabling proper tree shaking when bundling dependencies with webpack.
The text was updated successfully, but these errors were encountered: