Skip to content

fix(template): use correct heroui-native path in monorepo setups#925

Open
bibblebabl wants to merge 1 commit intoAmanVarshney01:mainfrom
bibblebabl:fix/native-uniwind-heroui-monorepo-path
Open

fix(template): use correct heroui-native path in monorepo setups#925
bibblebabl wants to merge 1 commit intoAmanVarshney01:mainfrom
bibblebabl:fix/native-uniwind-heroui-monorepo-path

Conversation

@bibblebabl
Copy link
Copy Markdown
Contributor

@bibblebabl bibblebabl commented Feb 28, 2026

Summary

  • In turborepo monorepos, bun hoists heroui-native to the root node_modules, so @source './node_modules/heroui-native/lib' in global.css doesn't resolve — HeroUI classes silently go missing
  • Converted global.css to a Handlebars template (.hbs) that conditionally uses ../../node_modules/heroui-native/lib when the turborepo addon is enabled, and keeps the original ./node_modules/heroui-native/lib for non-monorepo setups

Fixes #810

Summary by CodeRabbit

  • Chores
    • Updated template configuration to dynamically resolve paths based on project setup and available add-ons.

In turborepo monorepos, bun hoists heroui-native to the root
node_modules, so the @source directive in global.css needs to
reference ../../node_modules instead of ./node_modules.

Convert global.css to a Handlebars template that conditionally
sets the correct path based on whether turborepo addon is enabled.

Fixes AmanVarshney01#810
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 28, 2026

@bibblebabl is attempting to deploy a commit to the Better T Stack Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd46d68 and 8e2b157.

📒 Files selected for processing (2)
  • packages/template-generator/src/templates.generated.ts
  • packages/template-generator/templates/frontend/native/uniwind/global.css.hbs

Walkthrough

Added a conditional in the HeroUI Uniwind CSS template to select the appropriate node_modules import path based on whether the turborepo addon is included. When turborepo is present, uses a relative path traversal; otherwise uses the default path.

Changes

Cohort / File(s) Summary
HeroUI Uniwind CSS Template
packages/template-generator/templates/frontend/native/uniwind/global.css.hbs, packages/template-generator/src/templates.generated.ts
Introduced conditional logic using Handlebars to set the @source path for heroui-native based on turborepo addon inclusion. Uses ../../node_modules/heroui-native/lib when turborepo addon is present, otherwise falls back to ./node_modules/heroui-native/lib. Also includes imports for uniwind and heroui-native styles.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the heroui-native path configuration for monorepo setups by making it conditional in a Handlebars template.
Linked Issues check ✅ Passed The pull request fully addresses issue #810 by conditionally setting the heroui-native path based on turborepo addon inclusion, using the correct relative paths for both monorepo and non-monorepo environments.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the heroui-native import path issue in monorepo setups. No extraneous modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Expo + Uniwind in Monorepo uses wrong import path for HeroUI styles

1 participant