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
As you know, lodash has a capability to import modularized sub-packages called per method packages
It is good for you to make this package modularized especially for the independent functionalities.
for example when a project only needs one of these package functionalities e.g. Sheba, it is better to add and import it like this:
yarn add persian-tools.sheba
importShebafrom'persian-tools.sheba'
this approach is good for minimizing projects bundle size when using this package because many projects don't need all of these package functionalities
The text was updated successfully, but these errors were encountered:
If you import or require methods directly, e.g. const sheba = require('persian-tools2/sheba'), only the subset of persian-tools2 your package uses will be bundled in projects that use your package.
So another way can be that.
As you know, lodash has a capability to import modularized sub-packages called per method packages
It is good for you to make this package modularized especially for the independent functionalities.
for example when a project only needs one of these package functionalities e.g.
Sheba
, it is better to add and import it like this:this approach is good for minimizing projects bundle size when using this package because many projects don't need all of these package functionalities
The text was updated successfully, but these errors were encountered: