Closed nwoodr94 closed 2 years ago
Hi. Would it be possible for you to share your Webpack configuration?
Hi, I took a look at a coworker's package.json
and noticed that he has an updated version.
I was on 8.8.0, but after upgrading to 9.0.4, this issue went away.
I'm using react-scripts
through create-react-app
, so I don't have immediate access to the Webpack.
Ah perfect! Thanks for letting me know. Happy coding!
Please avoid duplicates
Language and Compiler
Babel and WebPack JavaScript
What environment are you using?
Local Development Server
When does your problem occur?
While writing code
What does your problem relate to?
The problem seems React related
React-Unity-WebGL Version
8.8.0
React Version
18.1.0
Unity Version
2021.3.5f1
What happened?
import { Unity, useUnityContext } from "react-unity-webgl";
Produces the following error:
export 'useUnityContext' (imported as 'useUnityContext') was not found in 'react-unity-webgl' (possible exports: UnityContext, __esModule, default)
Reproducible test case
Copy and paste the example code (from https://react-unity-webgl.dev/docs/getting-started/hello-world)
The code does not compile.
Would you be interested in contributing a fix?