We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 304a29a commit c871244Copy full SHA for c871244
packages/ui-source-code-editor/src/SourceCodeEditor/SearchPanel.tsx
@@ -144,8 +144,10 @@ export default function customSearch(searchConfig: SearchConfig | undefined) {
144
dom.style.padding = '8px'
145
const reactVersionMajor = Number(React.version.split('.')[0])
146
if (reactVersionMajor >= 18) {
147
+ const module = 'react-dom/client'
148
// webpack tries to evaluate imports compile time which would lead to an error on older react versions
- import(/* webpackIgnore: true */ 'react-dom/client')
149
+ // Vite errors out during build in React v16/17
150
+ import(/* webpackIgnore: true */ /* @vite-ignore */ module)
151
.then((r) => {
152
const root = r.createRoot(dom)
153
root.render(
0 commit comments