Existing Solution:
The existing implementation of config service integrations in portal are available as helper methods as part of the portal code which is tightly bounded to portal module.So if we want to implement it for content service it requires rewriting the whole helper part which adds the complexity whenever changes are to be done.
Proposed Solution:
Inorder to fit all js modules we should make changes into the existing config builder/helper implementations and we should convert it into a generic js module which works with portal or content service as a npm package.