I was wondering how can I create a node module that only expose JSON files for configuration. I can easily export JSON object from index.js but, I was thinking any better way to expose JSON from node module, and during build minify the JSON to be exposed.
It will have multiple folder level configuration for different apps.
Example -
config-module
-- App1
-----config1.json
-----config2.json
-- App2
-----config3.json
-----config4.json
And while importing in js i can import like
import config from 'config-module/App1/config1.json'
I cannot find any reference module related to this. If any reference it would be a great help