fix: exclude extensions from release build#1947
Conversation
Extensions are meant to be loaded at runtime, not bundled at build time. This removes the @extensions alias and glob import that was causing the release build to fail when trying to resolve @hypr/ui imports from the extensions folder. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughExtension loading transitions from build-time bundling to runtime loading. Build-time eager loading of bundled extension modules is removed from the registry initialization. The "@extensions" path alias is removed from both TypeScript and Vite configurations to support this runtime-based approach. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-11-24T16:32:13.593ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (2)
Comment |
Summary
Fixes the release build failure caused by Rollup trying to resolve
@hypr/ui/components/ui/buttonfrom the extensions folder. Theextensions/folder contains example extensions that are meant to be loaded at runtime, not bundled at build time.This PR removes:
@extensionsalias from vite.config.ts@extensions/*path mapping from tsconfig.jsonimport.meta.globthat was bundling extension UI componentsThe
bundledExtensionComponentsexport is preserved as an empty object to maintain API compatibility. Extensions should be loaded at runtime via the extensions plugin.Review & Testing Checklist for Human
@hypr/uiresolution errordynamicExtensionComponentsobject exists but isn't populated yet; verify this aligns with the planned extension systemTest plan: Run
pnpm -F desktop tauri buildand verify it completes without the Rollup resolution error.Notes