Marcelo Shima
Marcelo Shima
This is a jest-preset-angular bug. https://github.com/thymikee/jest-preset-angular/issues/908
Thanks @Shinigami92 for the quick feedback. Marking as ready for review, since it the requested changes have been addressed.
> I found out that this `.default` is only an issue using `esm`, but not `cjs` I think this is because of: https://github.com/faker-js/faker/blob/56424709b7ccd7aa7fe6130c78a770a0a901d7b5/package.json#L36 This makes node esm to import cjs...
I will checkout the project to see the generated code. Until now it could be done using CI 😄.
> Currently we need to do something like this: > > ```ts > import { Faker } from "@faker-js/faker"; > import es from "@faker-js/faker/locales/es"; > import fr from "@faker-js/faker/locales/fr"; >...
Should work like: ```js const { Faker } = require("@faker-js/faker"); const { es, fr } = require("@faker-js/faker/locales"); console.log( "Manually loaded locale:", new Faker({ locales: { es, fr }, locale: "es",...
If someone else manages to finishes it, go ahead. I want to finish it, I couldn’t find the time to do it yet. The cjs part will probably need to...
@Shinigami92 this new approach seems to do the trick. v6 locale export was different.
@Shinigami92 no problem, I cannot use v7 for now since we need node 12 support.
I think these makes more sense > * `import { de } from '@faker-js/faker/locales'` > * `import { de } from '@faker-js/faker'`