file show_subsections.js • Make the changes you want in show_subsections.js • load both show.js and show_subsections.js to memory • In runtime use the appropriate module according to feature toggle state
const getShowModel = multiquire(‘./model/show’); using multirequire() loads ‘show.js’ to memory loads both ‘show.js’ and ‘show_subsections.js’ to memory
get messy if we’re not using abstraction layers to manage our branching • CommonJS already gives us a very good start point • Using multiquire we can create variation files and use the relevant file on runtime