diff --git a/lib/intermediate-representation-dir/app.js b/lib/intermediate-representation-dir/app.js
index 8691f60aef41c..53e69583beb36 100644
--- a/lib/intermediate-representation-dir/app.js
+++ b/lib/intermediate-representation-dir/app.js
@@ -10,11 +10,9 @@ const rootElement = document.getElementById(`react-mount`)
let Root = require('./root')
if (Root.default) { Root = Root.default }
-// Let site, plugins wrap the site e.g. for Redux.
-const WrappedRoot = apiRunner('wrapRootComponent', { Root: Root }, Root)
ReactDOM.render(
-
+
,
rootElement
)
@@ -23,11 +21,9 @@ if (module.hot) {
module.hot.accept(`./root`, () => {
let NextRoot = require('./root')
if (NextRoot.default) { NextRoot = NextRoot.default }
- // Let site, plugins wrap the site e.g. for Redux.
- const WrappedRoot = apiRunner('wrapRootComponent', { Root: NextRoot }, NextRoot)
ReactDOM.render(
-
+
,
rootElement
)
diff --git a/lib/intermediate-representation-dir/root.js b/lib/intermediate-representation-dir/root.js
index ee4cdf1dd6ab9..61b22d8cfbf86 100644
--- a/lib/intermediate-representation-dir/root.js
+++ b/lib/intermediate-representation-dir/root.js
@@ -30,4 +30,7 @@ const Root = () => (
/>
)
-export default Root
+// Let site, plugins wrap the site e.g. for Redux.
+const WrappedRoot = apiRunner('wrapRootComponent', { Root: Root }, Root)
+
+export default WrappedRoot