Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution. Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.