diff --git a/lib/react/engine.js b/lib/react/engine.js index 3df2ac283b..2e5b169027 100644 --- a/lib/react/engine.js +++ b/lib/react/engine.js @@ -1,12 +1,11 @@ const { renderToString } = require('react-dom/server') const { transform } = require('./babel') - -// These all need to be here even though eslint doesn't think so -/* eslint-disable */ const React = require('react') -const CodeBlock = require('../../dist/react/CodeBlock') -const CodeEditor = require('../../dist/react/CodeEditor') -/* eslint-enable */ + +const components = { + CodeBlock: require('../../dist/react/CodeBlock'), + CodeEditor: require('../../dist/react/CodeEditor') +} const renderReact = async componentStr => { // Get component name as string so we can use it in the class name @@ -15,10 +14,17 @@ const renderReact = async componentStr => { // Add the wrapper and class name so we can later use React hydration on the client // side const jsx = `