You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using stealthy-require to reload React components for server-side rendering. One of their dependencies, namely react-helmet should not be reloaded.
It turned out to be much more complicated than your suggestion below because (a) Browserify and Webpack need to be supported, (b) the module which should not be reloaded may or may not be cached already when the stealthyRequire(...) call is made, and (c) the module – i.e. react-helmet – may itself depend on modules that also should not be reloaded. Therefore my universal solution has the drawback of having to require react-helmet an additional time and discards that module instance immediately. That impacts the load performance.
Since you are using node.js and apparently react-helmet is already cached before the stealthyRequire(...) call is executed, you may choose to continue using your solution which is not universal but sufficient for you and more performant.
I'm using
stealthy-require
to reload React components for server-side rendering. One of their dependencies, namelyreact-helmet
should not be reloaded.My current workaround is:
It'd be neat if
stealthyRequire
would take IDs that should not be cleared. Perhaps:The text was updated successfully, but these errors were encountered: