Parcel 2 + React + Dynamic HTML meta properties - is it possible?

Viewed 31

Originally I was intent to ask about dynamic rendering with Parcel but then I thought my question has to be more generic.

So, what we're trying to achieve is to let social medias / messengers creating a previews with dynamically set images (for instance, first photo on this page). The problem is, we use React which is SPA which means we don't have a page for each of the product so we have to do that dynamically. Which, of course, not going to work out of the box as crawlers don't run any js.

We found this solution but it assumes using Express and run index script which would return index.html

Now, according to Parcel 2 documentations we run Parcel apps like this: parcel index.html and the page contains index script in it. So, page goes first then there is a script that, as Express starter script, is supposed to retrun index,html! Sounds like a really, really bad idea to me.

So, the question is, with such combination, is it possible to have dynamic meta properties at all?

In case it's related, we host on Netify.

0 Answers
Related