I have a config file. I added the file to .gitignore
because it will be different based on the environment.
In some environments, the file might not be existing. In this case, I will use default values. So want to import a JSON file if it exists. I can import JSON file easily like import config from 'config.json';
When the file does not exist, it says: "Cannot find module 'config.json'."
I'm using angular 8, typescript.