[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[v0](/c/v0/59)

# Index importing system broken

43 views · 0 likes · 2 posts


4n6h4x0r (@4n6h4x0r) · 2025-05-08

I've asked v0 to refactor my codes according to Next.js best practices. It recommends index re-export, with barrel file, so there's no need to specify file extensions. I've tried
* export { Header } from "@/components/common/header"
* export { Header } from "./header"
* export { Header } from "header"

I've also asked v0 to fix tsconfig.json.

None of them worked. What's the right way to do this please?


Pauline P. Narvas (@pawlean) · 2025-05-08

Hi, @4n6h4x0r! Welcome to the Vercel Community :waving_hand: 

How have you imported your existing code? :slight_smile: That might be a good place to start so that it has full context! 

I'll also share this post that may be helpful:
https://community.vercel.com/t/become-a-v0-expert/5981