From 69c3f7749397ffdfcececa1faefb6d7e07dfcf1a Mon Sep 17 00:00:00 2001 From: gabaldon Date: Mon, 9 Sep 2024 17:09:04 +0200 Subject: [PATCH] fix: use createRequired --- src/i18n.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i18n.ts b/src/i18n.ts index 955845855..47bd217b6 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,6 +1,8 @@ import rosetta, { Rosetta } from 'rosetta' -import en from '../src/locales/en.json' assert { type: 'json' } -import es from '../src/locales/es.json' assert { type: 'json' } +import { createRequire } from 'module' +const require = createRequire(import.meta.url) +const en = require('../src/locales/en.json') +const es = require('../src/locales/es.json') export type Locale = 'en' | 'es'