Open dmorenoAN opened 1 year ago
Other TypeScript compiler
Local Development Server
While the Unity App is loading
I don't know
9.2.1
18.2.0
2021.1.16f
Hi, i have been in a trouble with the thing mentioned in title. This plugin has conflicts with "vite-plugin-istanbul".
Not working code
export default defineConfig({ plugins: [react(), svgr(), istanbul({ cypress: true, requireEnv: false })], server: { port: 8000, host: "0.0.0.0", }, });
Working code
export default defineConfig({ plugins: [react(), svgr(), istanbul({ cypress: true, requireEnv: true})], server: { port: 8000, host: "0.0.0.0", }, });
I would like to know why is this happening, it seems to have no-relation. The option failing if false is requireEnv.
Thanks.
//App.tsx import React from "react"; import { Unity, useUnityContext } from "react-unity-webgl"; function App() { const { unityProvider } = useUnityContext({ loaderUrl: "xxx", dataUrl: "xxx", frameworkUrl: "xxx", codeUrl: "xxx", }); return ( <div className="App"> <Unity unityProvider={unityProvider} /> </div> ); } export default App;
//vite.config.ts import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import istanbul from "vite-plugin-istanbul"; export default defineConfig({ plugins: [react(), istanbul({ cypress: true, requireEnv: false })], });
Please avoid duplicates
Language and Compiler
Other TypeScript compiler
What environment are you using?
Local Development Server
When does your problem occur?
While the Unity App is loading
What does your problem relate to?
I don't know
React-Unity-WebGL Version
9.2.1
React Version
18.2.0
Unity Version
2021.1.16f
What happened?
Hi, i have been in a trouble with the thing mentioned in title. This plugin has conflicts with "vite-plugin-istanbul".
Not working code
Working code
I would like to know why is this happening, it seems to have no-relation. The option failing if false is requireEnv.
Thanks.
Reproducible test case
Would you be interested in contributing a fix?