Skip to content

chore(shared-ui): update import paths for styles and globals#479

Merged
luxass merged 1 commit intomainfrom
fix-css
Feb 4, 2026
Merged

chore(shared-ui): update import paths for styles and globals#479
luxass merged 1 commit intomainfrom
fix-css

Conversation

@luxass
Copy link
Member

@luxass luxass commented Feb 4, 2026

🔗 Linked issue

📚 Description

Summary by CodeRabbit

  • Refactor
    • Updated stylesheet import and export paths to streamline module resolution across the project configuration.

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: 3ab589c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

The changes refactor the shared-ui package's CSS export strategy by renaming the public export from @ucdjs-internal/shared-ui/styles/globals.css to @ucdjs-internal/shared-ui/styles.css and shifting from source-based exports to built dist-based exports. Build tooling, package configuration, and all import references are updated to reflect this change.

Changes

Cohort / File(s) Summary
Consumer CSS Import
apps/web/src/globals.css
Updated import path to use the new export alias @ucdjs-internal/shared-ui/styles.css instead of the previous @ucdjs-internal/shared-ui/styles/globals.css.
Package Configuration
packages/shared-ui/package.json, tooling/tsconfig/base.json
Removed sideEffects declaration. Updated package exports mapping from ./styles/globals.css → source to ./styles.css → dist-based output. Updated TypeScript path alias to match new export naming.
Build Configuration
packages/shared-ui/tsdown.config.ts
Updated exports mapping from source to dist-based output, added copy step to move CSS file into dist directory during build, and enabled ESM format option.
CSS Source
packages/shared-ui/src/styles/globals.css
Expanded @source glob pattern to include JavaScript variants (js, mjs, jsx) alongside TypeScript source files (ts, tsx).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

pkg: shared

Poem

🐰 Hop along, dear styles so bright,
From source to dist, we set things right,
A simpler path, a cleaner way,
Your exports dance in fresh display! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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 objective of the changeset: updating import paths for styles in the shared-ui package across multiple configuration and source files.
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.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-css

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.

@github-actions github-actions bot added the apps: web Changes related to the Website. label Feb 4, 2026
@luxass luxass marked this pull request as ready for review February 4, 2026 18:14
Copilot AI review requested due to automatic review settings February 4, 2026 18:14
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🌏 Preview Deployments

Application Status Preview URL
API ✅ Deployed View Preview
Website ✅ Deployed View Preview
Documentation ✅ Deployed View Preview

Built from commit: 3ab589cfab50d377b80749f2b481a2833551b437


🤖 This comment will be updated automatically when you push new commits to this PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the shared UI package’s style export and import paths so that consumers import a stable styles.css entry built into dist, and broadens the globals CSS source scanning to include built JS/JSX files.

Changes:

  • Update TypeScript path mapping and app-level CSS import to use @ucdjs-internal/shared-ui/styles.css instead of the deeper styles/globals.css path.
  • Adjust the shared-ui package exports and tsdown build config so ./styles.css points to ./dist/styles/globals.css, and copy the CSS into dist/styles at build time.
  • Broaden the Tailwind @source glob in globals.css to scan ts,tsx,mjs,js,jsx files under src/ui.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tooling/tsconfig/base.json Updates the path alias to expose shared-ui styles as @ucdjs-internal/shared-ui/styles.css while still resolving to the source globals.css for local development.
packages/shared-ui/tsdown.config.ts Ensures the build copies src/styles/globals.css into dist/styles and exports it as ./styles.css from the package.
packages/shared-ui/src/styles/globals.css Expands the Tailwind @source glob so styles are generated from both source and built UI files (TS/JS/JSX/MJS).
packages/shared-ui/package.json Changes the public export from ./styles/globals.css (source) to ./styles.css (built dist CSS) and aligns the files included in the package.
apps/web/src/globals.css Updates the app to import styles from the new @ucdjs-internal/shared-ui/styles.css entrypoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@luxass luxass enabled auto-merge February 4, 2026 18:18
@luxass luxass merged commit acaada0 into main Feb 4, 2026
41 of 42 checks passed
@luxass luxass deleted the fix-css branch February 4, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps: web Changes related to the Website.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant