diff --git a/src/lib/file.ts b/src/lib/file.ts index 2ecc24b..c1a9a78 100644 --- a/src/lib/file.ts +++ b/src/lib/file.ts @@ -35,6 +35,7 @@ export const getTranslationFromModel = ( } const extname = path.extname(filePath); if (isJson(extname) || isSource(extname)) { + delete require.cache[require.resolve(filePath)]; return require(filePath) as JsonObject; } return Error('file extension type should be either .json or .ts|.js');