Skip to content

ReferenceError: Can't find variable: global #442

Open
@EvilTrev

Description

@EvilTrev

typedarray-pool attempts to use the global object here:

//Legacy pool support
if(!global.__TYPEDARRAY_POOL) {
  global.__TYPEDARRAY_POOL = {
.......
  }
}

I'm running TypeScript tsx files with vite. The code is little more than the HelloGL example at this point. Thoughts? It looks like typed array pool should probably be using globalThis, or a more elaborate section of code (like the one shown here: stephenh/ts-proto#70 (comment)).

library version

├─┬ gl-react-dom@5.2.1
│ └── gl-react@5.2.0 deduped
└── gl-react@5.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions