Skip to content

Conversation

@Om-singh-ui
Copy link

Fixes #8499

Changes Made

  • ✅ Updated all type-only imports in apps/www/registry/**/ui/** to use import type
  • ✅ Updated all type-only imports in apps/v4/app/examples/playground/components/** to use import type
  • ✅ Maintained proper separation between type and value imports as required by verbatim module syntax
  • ✅ No runtime behavior changes - purely TypeScript import syntax improvements

Benefits

  • Improved Compatibility: Enables usage with strict TypeScript configurations
  • Cleaner Imports: Explicit separation between type and value imports
  • Better Build Performance: Helps bundlers and compilers optimize more effectively
  • Future-Proof: Aligns with TypeScript's direction for module syntax

Verification

  • pnpm build:registry runs successfully without errors
  • ✅ All components build and render correctly
  • ✅ No runtime behavior changes detected
  • ✅ TypeScript compilation passes with verbatimModuleSyntax: true enabled

Testing

Steps to Verify:

  1. Enable "verbatimModuleSyntax": true in tsconfig.json
  2. Run pnpm build:registry (or build the www workspace)
  3. Observe no build errors
  4. Verify all components render correctly in the playground

Before:

import { SliderProps, ButtonProps } from "@/components/ui/slider";
// TS1487 Error with verbatimModuleSyntax

…tibility

- Updated all type-only imports in apps/www/registry/**/ui and apps/v4/app/examples/playground/components/**
- Added explicit 'import type' syntax for Props interfaces and type-only imports
- Ensures compatibility with TypeScript's verbatimModuleSyntax setting
- Verified build passes with pnpm build:registry
- No runtime behavior changes
@vercel
Copy link

vercel bot commented Oct 18, 2025

@Om-singh-ui is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Om-singh-ui
Copy link
Author

@shadcn-team Could you please review this PR? It fixes #8499 by updating type-only imports to use import type.

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.

[bug]: Type-only imports break build with "verbatimModuleSyntax": true

1 participant