@krisc-informatica if I understand you correctly, you have all features in local src, but only want to turn on certain feature set based on client’s subscription. You can bundle all modules for every client, but it seems not optimal to ship unused modules to a client.
If you use cli+requirejs setup, one easy solution I can think of, is to use code splitting on all feature sets, like this:
Note I use simplified glob on js that only works with latest cli v1.0.0-beta.1
Note there is a trick in my config, I put
app-bundle.js, so I don’t have to write verbose
"exclude" list for
Now you have separated bundle file per feature, you can have a deployment script that only copies needed bundle files to certain client.
Be careful, if client-a doesn’t use
feature/one, you need to make sure at runtime that no code will trigger
import foo from 'feature/one/foo';.