Skip to content

Create faker instances while avoiding bug regarding too big bundle size #2178

Closed Answered by Shinigami92
tobiaswaltl asked this question in Q&A
Discussion options

You must be logged in to vote

So I assume this is not working for you, due to the bug? https://fakerjs.dev/guide/localization.html#custom-locales-and-fallbacks

Could you try this and report us back?

import { Faker } from "@faker-js/faker";
import { faker as fakerDe } from "@faker-js/faker/locale/de";

const myCustomFaker = new Faker({
  locale: [fakerDe.rawDefinitions, ...],
});

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@tobiaswaltl
Comment options

Answer selected by tobiaswaltl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants