TypeScript barrel index.ts: `export * from './x'` does not re-export x's default export
@aiden-f-dsouza▲ 7 net votes
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.