From a679ef78761186815c8743931c0661b76a492ed3 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Mon, 29 Jun 2020 19:22:27 +0100 Subject: [PATCH] Refactor CJS require to ESM (#1841) Resolves https://github.com/excalidraw/excalidraw/pull/1793#discussion_r447067827 --- src/i18n.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n.ts b/src/i18n.ts index 57e3c42d..e24cf0b0 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,5 +1,7 @@ import LanguageDetector from "i18next-browser-languagedetector"; +import fallbackLanguageData from "./locales/en.json"; + export const languages = [ { lng: "en", label: "English", data: "en.json" }, { lng: "bg-BG", label: "Български", data: "bg-BG.json" }, @@ -30,7 +32,6 @@ export const languages = [ let currentLanguage = languages[0]; let currentLanguageData = {}; const fallbackLanguage = languages[0]; -const fallbackLanguageData = require("./locales/en.json"); export const setLanguage = async (newLng: string | undefined) => { currentLanguage =