To simplify matters, lets say there's a single HTML page with it's CSS and JS file. No server.

Now comes a request to toggle features on/off in this simple web UI.  

The problem is, for example, a new feature would mean changing the *`HTML`* structure to add a new component, so now the HTML is a little different. 
Also, the *`CSS`* of the page itself needs to change in order to support the new component. also, of course, there is *`javascript`* code that needs to be changed to fit with the changes made to the HTML.. 

Of course, if this component was completely "isolated" and had **just** it's own CSS, javascript and html template file, it was much much easier, but it does require changes to things around it, to the `HTML/CSS/JS` of the page it resides in.

How can such a complex process be reduced to a simple "feature toggle"?

---

Also, to bring the complexity to a new level, this new feature might need changes to some library version used in the project, but that's a whole other level of difficulty when toggling features.. but lets ignore this part on the discussion because I am more interested on the matter mentioned above.