Skip to content

Commit 93e8e53

Browse files
authored
feat: use export default for locales (#249)
1 parent 160de12 commit 93e8e53

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { Hacker } from './hacker';
1212
import { Helpers } from './helpers';
1313
import { Image } from './image';
1414
import { Internet } from './internet';
15+
import allLocales from './locales';
1516
import { Lorem } from './lorem';
1617
import { Mersenne } from './mersenne';
1718
import { Music } from './music';
@@ -438,7 +439,7 @@ export class Faker {
438439

439440
// since we are requiring the top level of faker, load all locales by default
440441
export const faker: Faker = new Faker({
441-
locales: require('./locales'),
442+
locales: allLocales,
442443
});
443444

444445
export default faker;

src/locales/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ const locales: { [lang: string]: LocaleDefinition } = {
115115
zu_ZA,
116116
};
117117

118-
export = locales;
118+
export default locales;

0 commit comments

Comments
 (0)