Uibuilder + React (socket.io module not found)

Yes. Except use the .min. version for the uibuilderfe library, it is already compressed.

uibuilderfe isn't really an issue as it is already wrapped in a way that makes it behave nicely no matter how it is called. You can include that in your build if you like but if you do, you have to remember to rebuild your front-end code every time you update the uibuilder package. For what you get in return, the gain is so small, it isn't worth the possible annoyance of forgetting to rebuild and ending up with a flow that doesn't work because the node-red end is expecting a newer version of the front-end.

Similarly with the socket.io client. It is already packaged nicely for you and you really gain next to nothing by including it in your build. and the same problem applies. If the server gets updated and you forget to update your front-end code, you will be back to that same error again.

Both libraries work just fine as script links and being towards the end of your code, are already loaded efficiently. Both are already packed if you use the .min version (socket.io doesn't use a separate .min version, it is already optimised) so you don't gain much there.

In addition, browser caching will negate much of the remaining benefits including them in build would give you.

Go for simplicity and stability over too much optimisation.