Nextjs forces --isolatedModules and whenever we generate our typescript-sdk and try to import it from our monorepo it crashes on build time.
Type error: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
> 1 | export { ChatStreamRequest } from "./ChatStreamRequest";
| ^
2 | export { ChatRequest } from "./ChatRequest";
Expected behavior
It should export interfaces using type-only imports
export type { ChatStreamRequest } from "./ChatStreamRequest";
export type { ChatRequest } from "./ChatRequest";
Describe the bug
Nextjs forces
--isolatedModules
and whenever we generate ourtypescript-sdk
and try to import it from our monorepo it crashes on build time.Expected behavior It should export interfaces using type-only imports
Versions