TypeScript export named default error All In One
error
// ✅ function declare
// export default function app() { return `index app`; };
// ❌ variable declare
// export default const app = `index app`;
// const app = `index app`;
// export default app;
import app from './app.ts';
console.log(`app =`, app);
solution
https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports
demos
https://codesandbox.io/s/typescript-export-named-default-error-3yqdxw