Accepted answer

Well, since nobody has any clue I'll answer close this one since I did solve the problem with build but I am not sure how and why:

turns out code above

// ....auth/types.ts
import { typesWithPrefix, asyncTypes } from '../../utils';

typesWithPrefix(// ...

does work in development but does not in production;

but the code

// ....auth/types.ts
import * as utils from '../../utils';

utils.typesWithPrefix(// ...

does works both in development and production, despite the fact thats just pure functions as named exports and reexports in index.ts files.

I would love to dig deeper and uncover this mystery but this will require to eject and I really, really don't won't to do it until I can avoid it...

Related Query

More Query from same tag