Add extension to import

This commit is contained in:
Dean 2025-03-29 18:41:59 -07:00
parent 27a1638243
commit 532e9f7e5e

View File

@ -31,7 +31,7 @@ vi.mock("i18next", async importOriginal => {
const filename = req.params[0]; const filename = req.params[0];
try { try {
const json = await import(`../public/locales/en/${req.params[0]}`); const json = await import(`../public/locales/en/${req.params[0]}.json`);
console.log("Loaded locale", filename); console.log("Loaded locale", filename);
return HttpResponse.json(json); return HttpResponse.json(json);
} catch (err) { } catch (err) {