This is an example project showing how to build cross compatible libraries that work on Node.js and browser (or any other) environments, even it they have different dependencies. All that with only a single code base and nice separation of concerns directly within your library's code.
A comprehensive tutorial on how to build this example step by step can be found here: https://blog.unterholzer.dev/cross-compatible-typescript-libraries
This project was bootstrapped with TSDX and is available under the MIT License.