Bug: Broken barrel exports in ui/index.jsx and ui/all.jsx #53
Labels
No Label
P0 Critical
P1 High
P2 Medium
P3 Low
accessibility
backend
bug
content
data-integrity
enhancement
frontend
infra
integration
owner
owner-input
performance
performance
phase-7
phase-8
security
seo
ui
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Queue-North-Website#53
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two barrel export files (
src/components/ui/index.jsxandsrc/components/ui/all.jsx) are broken and would fail if anyone imported from them.index.jsxissuesexport { default as X } from './X.jsx'line assumes default exports, but none of these components have default exports. They all use named exports only (e.g.,export { Button },export { Card, CardHeader, ... }).CardContent.jsx,CardHeader.jsx,CardTitle.jsx,CardFooter.jsxwhich don't exist as separate files. These components are only defined insideCard.jsx.CardDescriptionis exported from bothCard.jsxandCardDescription.jsx. Theindex.jsximports fromCardDescription.jsx(which works) butall.jsximports fromCard.jsx.index.jsxtriesexport { default as Sheet, ... }which will fail.all.jsxissuesCardDescriptionfromCard.jsxinstead ofCardDescription.jsx.Impact
Currently no runtime impact because no files import from
index.jsxorall.jsx— all pages import directly from individual component files. But if anyone adds an import likeimport { Button } from '@/components/ui', it will break the build.Fix
Either:
Option 1 (delete) is recommended since the direct imports work fine.