So far so good - the problem is, when I completely override the react and react-dom dependencies in npm, the next.js build itself works just fine, but it breaks all unit tests in jest either using react-test-renderer or enzyme-adapter-react-16. The problem is that those testing libs try to access features inside the libaries which are not contained in preact/compat (for example react-dom/test-utils).
Is it really necessary to alias the react and react-dom modules "globally" for the whole project?
When I try to install the plugin into our Next.js 11.1 project, I run into serious problems because of the dependency requirements of the plugin.
When I start up my next dev server, I get this message:
So far so good - the problem is, when I completely override the
react
andreact-dom
dependencies in npm, the next.js build itself works just fine, but it breaks all unit tests in jest either usingreact-test-renderer
orenzyme-adapter-react-16
. The problem is that those testing libs try to access features inside the libaries which are not contained in preact/compat (for examplereact-dom/test-utils
).Is it really necessary to alias the react and react-dom modules "globally" for the whole project?