software-mansion / software-mansion/TypeGPU

fix(unplugin-typegpu): Babel plugin doesn't handle functions as object properties

Open
#1,888 0 comments 0 reactions 1 assignee View on GitHub

@cieplypolar is already working on this.

Since Nov 4, 2025.

Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

const DEFAULTS = {
  getGravity: () => {
    'use gpu';
    return d.vec3f(1, 2, 3);
  },
};

const main = () => {
  'use gpu';
  const hello = DEFAULTS.getGravity();
};

Allegedly, the babel plugin does not catch the getGravity function and doesn't emit metadata for it. Create a test case for both the rollup and babel version of the plugin, and fix the behavior if it occurs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.