import React from 'react'
import ReactDOM from 'react-dom'
import {Sanity} from '@sanity/base'

ReactDOM.render(
  <Sanity />,
  document.getElementById('sanity')
)

@@ -1,20 +1,56 @@
+/* eslint-disable no-process-env */%0A
 import React from 'r
@@ -124,17 +124,96 @@
 y/base'%0A
-%0A
+import plugins from '@sanity/plugin-loader/plugins'%0A%0Afunction render(roles) %7B%0A  
 ReactDOM
@@ -221,16 +221,18 @@
 render(%0A
+  
   %3CSanit
@@ -236,13 +236,29 @@
 nity
+ roles=%7Broles%7D
  /%3E,%0A
+  
   do
@@ -289,10 +289,279 @@
 anity')%0A
+  )%0A%7D%0A%0Aif (process.env.NODE_ENV !== 'production') %7B%0A  // Hot module reloading for plugins? Yes please.%0A  if (module.hot) %7B%0A    module.hot.accept('@sanity/plugin-loader/plugins', () =%3E %7B%0A      render(require('@sanity/plugin-loader/plugins'))%0A    %7D)%0A  %7D%0A%7D%0A%0Arender(plugins
 )%0A

Move roles lookup into server entry in order to allow hot module reloading