title: How to structure my npm module to use external config file if present?
body: <p>I am making a React component as npm module. So far I managed to use the webpack to bundle the code and everything looks good. However I want to make my module globally customizable. My approach is to use <code>config.json</code> file in the root of the project. I can't figure out how to make this in such way that:
  1. If the file is not present nothing happens (I have default config in the module root folder)
  2. If the file is present - use its options along with the options from the default that are not specified. The user config always needs to override the default values.</p>
  
  <p>I tried conditional require, but it seems that this doesn't work</p>