From c49cfc8cda2fab83f993864c6bea46d75b6533c5 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 21 Apr 2023 11:46:00 +0200 Subject: [PATCH] Inject react-dom in the shared scope (#1320) --- packages/voila/package.json | 3 ++- packages/voila/src/main.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/voila/package.json b/packages/voila/package.json index ba60e6a12..9fa414816 100644 --- a/packages/voila/package.json +++ b/packages/voila/package.json @@ -40,7 +40,8 @@ "@lumino/signaling": "^1.7.2", "@lumino/virtualdom": "^1.11.2", "@lumino/widgets": "^1.26.2", - "react": "^17.0.1" + "react": "^17.0.1", + "react-dom": "^17.0.1" }, "devDependencies": { "@babel/core": "^7.2.2", diff --git a/packages/voila/src/main.ts b/packages/voila/src/main.ts index a26afaa28..fa9f7e79e 100644 --- a/packages/voila/src/main.ts +++ b/packages/voila/src/main.ts @@ -12,6 +12,9 @@ // Inspired by: https://github.com/jupyterlab/jupyterlab/blob/master/dev_mode/index.js +// Inject some packages in the shared scope +import 'react-dom'; + import { PageConfig, URLExt } from '@jupyterlab/coreutils'; import { VoilaApp } from './app';