This is how you end up with massive tech debt though right? Replacing a dependency is going to be more expensive than writing something yourself, especially if it’s been around a long time.
Possibly you will end up with tech debt. But similarly to how most start ups begin with financial debt until their product generates enough revenue, it can also be a perfectly good strategy to allow for tech debt in the beginning. If this enables you to bring a MVP to the market faster than your competitors, you're good.