rokucommunity / rokucommunity/brighterscript

Tree shaking

Open
#183 1 comment 3 reactions 1 assignee View on GitHub

@iObject is already working on this.

Since Mar 18, 2026.

  • #1643 by @iObject — open
BrighterScript enhancement
Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

We should add the ability to discard unused code. (Called tree shaking in JavaScript land).

This would mean removing functions that are never called, and components that are never used, and any other files in the package that are never referenced.

There are several edge cases that we will need to guard against, like certain functions referenced by string name as callbacks, components added through node update() calls, and I'm sure some others as well. But we can develop patterns to support these edge cases.

This would allow for smaller package sizes.

Contributor guide

No contributing guide indexed for this repository

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.