How does Facebook resolve bundle urls for React components?

(Rom325) #1

Hi everyone! :slight_smile:
Hope you’re doing well!

In this post ReactJS components are used on server side.
I also know that Facebook does bundle JS and CSS code.

How React component’s name is mapped to appropriate bundle url/name?
i.e. fb:friends-list should reside in some js-chunk served separately from Hack backend.
How backend knows where can browser get corresponding javascript code?

It is very interesting to me as I want to resolve chunk urls on server side in php avoiding webpack’s code splitting.