es module makes sense.
I'd prefer to:
- add an
entry option to allow users to specify the entry point; or
- add a
preferCondition: "import" | "require" option and use enhanced-resolve to resolve the entry.
Once we add a resolver library to the codebase, we can also use it to resolve the type declaration file more reliably.