Skip to content

fix(bundler): pass env.catalyst when bundling for Mac Catalyst - #8

Merged
farfromrefug merged 1 commit into
mainfrom
fix/catalyst-webpack-env
Oct 2, 2026
Merged

farfromrefug merged 1 commit into
mainfrom
fix/catalyst-webpack-env

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

PR Checklist

  • The PR title follows our guidelines
  • There is an issue for the bug/feature this PR is for.
  • You have signed the CLA.
  • All existing tests are passing: not run for this change.
  • Tests for the changes are included.

What is the current behavior?

ns run/prepare catalyst bundles as iOS: buildEnvData only sets env.ios, so an app's webpack config cannot tell a Mac Catalyst bundle from an iOS one (needed for a compile-time __CATALYST__ flag).

What is the new behavior?

Catalyst builds also get env.catalyst = true in buildEnvData. iOS and Android are unchanged.

Verified in alpimaps: ns run catalyst with DefinePlugin({ __CATALYST__: !!env.catalyst }) compiles the Catalyst-only code in (iOS builds were not re-run: env.catalyst is simply absent there).

🤖 Generated with Claude Code

A Catalyst build bundles as iOS (its platform data says ios), so the app's
webpack config could not tell the two apart. Catalyst builds now also get
env.catalyst, which an app can turn into a compile-time flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review October 2, 2026 21:16
@farfromrefug
farfromrefug merged commit 6e928d9 into main Oct 2, 2026
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant