From e73d009c2115c52344bf4b7da86f093b35c795f2 Mon Sep 17 00:00:00 2001 From: David Wire Date: Tue, 30 Jul 2019 00:30:23 -0600 Subject: [PATCH] fix(package.json): Resolve react/react-dom dependency conflict for embedded users (#734) * fix(package.json): Resolve react/react-dom dependency conflict for embedded users Some of the recent changes around the script-tag support for ohif/Viewers included moving react and react-dom from peerDependencies to dependencies. This caused an error for embedded consumers of the viewer because there could be multiple versions of react included. The error in the console points to this link: https://reactjs.org/warnings/invalid-hook-call-warning.html. These changes are necessary to resolve the issue for embedded users and don't seem to break the standalone version either. * fix(script-tag/index.html): Add `react` and `react-dom` as external scripts for cypress tests The cyrpress tests won't pass unless we add the `react` and `react-dom` dependencies as external scripts since they're no longer first order depdencies. --- cypress/support/script-tag/index.html | 4 ++++ package.json | 8 ++++++-- rollup.config.js | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cypress/support/script-tag/index.html b/cypress/support/script-tag/index.html index c647ff594..5a645c3b4 100644 --- a/cypress/support/script-tag/index.html +++ b/cypress/support/script-tag/index.html @@ -25,6 +25,10 @@
+ + + +