It has not been explained or documented how the Lightroom team build their plugins this way. I think it has something to do with generating a resource bundle or something of that nature using with resource compiler used by developers on the Windows platform (i.e. not a Lightroom specific technique).
I haven't seen anyone outside of Lightroom team do this, and personally I don't think it is worth the effort given it would be Windows only and you would need to start distributing separate Windows and Mac versions of you plugins.
Europe, Middle East and Africa