
What happens when reusable libraries are not enough?
Building a website takes time, and to save on that time investment, we web developers create reusable libraries.
I've created an UI library called @wowjob/ui
That is very easy to start and develop websites and very customisable. If you look from afar, it's similar to Tailwind when we talk about the output and some of the strategies that are used to develop the library. However, this library is very easy to use, as it has a close to zero learning curve. It's also developed with server components and client components, and it has zero build time. One of the strongest points is that as long as you know CSS properties and the values they have, you know how to use this library.
So I started to develop interfaces and applications.
And the time to deploy them live arrived, so I had to decide between deploying to Vercel or deploying to Cloudflare or a mix of them.
Okay. Easier said than done. Without direct errors or at least information, I had to deduce from behaviours and observations that both Vercel and Cloudflare do not like you to use one project with multiple websites.
When I tried multiple strategies to find ways for my intended purpose to work out, I've even got to a point where Cloudflare showed me a message that I cannot use one of the projects and I was at least happy that I knew for sure that's one thing I can't do.
On Vercel, deploying the same project on two websites with the same code and same structure of configuration, I've noticed that one of the websites was not behaving the same as the other one. My initial reaction was that something was wrong because of me and I must have missed out on some configuration or some piece of code and tens of deploys later I found out it wasn't me, it was just Vercel.
So anyway, after 2-3 days of continuous trial and error, I found my strategy and now I can deliver the same project to 2 websites or 20 websites or 200 websites without having so many issues.
I'm sure this doesn't mean my life will be a perfect rainbow every single day from now on. I just know that problems don't come because you invite them, they just come uninvited.
So while I figured out a way to overcome those challenges, I'm pretty sure I'm just about to open another can of worms. Hey, this is the life of a web developer, constantly fighting to deliver value. On one side, you're happy when things are succeeding, and on the other side, it's living a nightmare, fighting errors that... Most of the time are not even directly related to you.
enough of the story, how's your day so far?
I'll share my experience about trying to implement a Markdown Editor, probably next time.