HACKER Q&A
📣 Igor_Wiwi

How to convert a React App to single script tag?


Is it possible to somehow create a single executable (in back-end terms) script tag?


  👤 galdosdi Accepted Answer ✓
Yeah, this is called bundling and is a standard part of pretty much everyone's npm build pipeline. Look into webpack or iirc esbuild. You can accomplish this with a dozen or so lines of npm build configuration and now that you know what it's called you shouldn't have a hard time finding an example on stack overflow

This is not react specific, it's pretty standard front end stuff and has been for like a decade