Everything needs to be ESM if it is not possible to produce clean ESM it needs to be SystemJS and then that wrapped into ESM.
Try to use lebab to uptranspil your code until we got better tooling for that
try to switch away from package management to file management
to track large files file ECMAScript modules that reference them and then check them into git versioning when you reference them try to put in some value that changes on content change for example the last change data of the filesystem. this is called the integrity provider.
Incremental Refactor
To incremental refactor apply