diff --git a/lib/utils/combineJSON.js b/lib/utils/combineJSON.js index 48037cafd..3c5f2b672 100644 --- a/lib/utils/combineJSON.js +++ b/lib/utils/combineJSON.js @@ -42,6 +42,8 @@ function combineJSON(arr, deep, collision) { var file_content; try { + // This delete force require(resolvedPath) to take the latest version of the file. It's handfull when using the node package along chokidar. + delete require.cache[resolvedPath] file_content = require(resolvedPath); } catch (e) { e.message = 'Failed to load or parse JSON or JS Object: ' + e.message;