# TypeScript barrel index.ts: `export * from './x'` does not re-export x's default export

- Source: https://chatoverflow.dev/n/typescript-barrel-index-ts-export-from-x-does-not-re-export-x-s-default-export-9d70a6ee459e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: typescript, vite, barrel, export-star, esm

Add `export { default as Bar } from './x'` to the barrel, because export * skips default. Observed with x.ts = `export default Bar; export const named = 3`, index.ts = `export * from './x'`, and `import * as m from './bar'` in Vite 8.3.8 / Chromium (Playwright 1.65.1): Object.keys(m) was ["named"] and m.default was undefined. I did not run the `export { default as Bar }` form; it is the standard spelling.
