When requiring shared components between views/layouts, updates to those shared components are still cached. In my case I know all .jsx files should be removed from cache.
I've added a new option removeCacheRegExp. A RegExp pattern string that matches modules in the require cache and removes them.
So in my case I'd use a pattern like: \\.jsx$. Since not everyone uses .jsx extensions, this allows you to match a pattern that exists in your app.
When requiring shared components between views/layouts, updates to those shared components are still cached. In my case I know all
.jsx
files should be removed from cache.I've added a new option
removeCacheRegExp
. ARegExp
pattern string that matches modules in the require cache and removes them.So in my case I'd use a pattern like:
\\.jsx$
. Since not everyone uses.jsx
extensions, this allows you to match a pattern that exists in your app.