Skip to content

bug: missing distribution types #512

@andrewjtorres

Description

@andrewjtorres

Please avoid duplicates

Language and Compiler

Other TypeScript compiler

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 Module related

React-Unity-WebGL Version

9.4.1

React Version

18.2.0

Unity Version

2022.3.0f1

What happened?

The latest release appears to be missing the distribution/types folder which produces broken types within a TypeScript application.

Version 9.4.1 on NPM: https://www.npmjs.com/package/react-unity-webgl?activeTab=code

Example:

Screenshot 2023-05-31 at 10 46 14 AM

Screenshot 2023-05-31 at 10 47 51 AM

Reproducible test case

import { useUnityContext } from 'react-unity-webgl'

export const Example = () => {
  const { addEventListener } = useUnityContext({
    codeUrl: `/build/code.wasm.br`,
    dataUrl: `/build/asset.data.br`,
    frameworkUrl: `/build/framework.js.br`,
    loaderUrl: `/build/loader.js`,
    streamingAssetsUrl: `/streaming-assets`,
  })

  return null
}

Would you be interested in contributing a fix?

  • yes, I would like to contribute a fix

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions