'Merging an existing package inside a monorepo: is it possible to have one npm package with two different sources for different versions?

I want to re-write an existing scoped npm package, and I want the new major version to be a part of an already existing monorepo.

Since the package is already published with the old Github repo - is it possible to maintain two different sources for a single npm package? Or what is the correct way to tackle this?

I want to still keep supporting the old version, so absorbing the current package state into the monorepo doesn't seem very practical... or am I missing something?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source