-
-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make separate export for simpleFaker #2748
Comments
Thank you for your feature proposal. We marked it as "waiting for user interest" for now to gather some feedback from our community:
We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements. We will start the implementation based on:
We do this because:
|
Great suggestion. Although, with v9, we work on finally getting tree shaking to work. That way, you should get a smaller bundle regardless of the import path you import from. |
What about import { faker } from "@faker-js/faker/locale/base" (gets it down to about 200KB from 500KB) |
I think that is a good workaround between the simpleFaker and fakerEn. |
do you think its worth mentioning that option on the localization page here https://fakerjs.dev/guide/localization.html#individual-localized-packages if so i can make a new PR for that |
I think the usage page would be more fitting. The localization page alredy lists "base", but doesn't give any explaination what that exactly means. |
I think we could give it a try. |
Fixed by #2790 You can already test in our alpha: |
Clear and concise description of the problem
In my vite project I use only methods from simpleFaker. But there is no separate export for this, so I use this import:
As I see the
esm/index.mjs
imports all files so i have a huge bundle.I switched to import a one locale:
it is a much better, but not enough.
Suggested solution
I suggest to make separate export like this:
It shouldn't be hard but will nice decrease my bundle.
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: