diff --git a/lib/consolidate.js b/lib/consolidate.js index 8a06431..55ec751 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -1312,7 +1312,13 @@ function reactRenderer(type){ if (!cache(options)){ // Parsing - Code = (type === 'path') ? require(resolve(str)) : requireReactString(str); + if (type === 'path') { + var path = resolve(str) + delete require.cache[path] + Code = require(path) + } else { + Code = requireReactString(str) + } Factory = cache(options, react.createFactory(Code)); } else {