title: Javascript / webpack : how to concatenate all json files in directory with a custom loop over files
body: <p>I am building a reactJs bundle with webpack.
  I am currently trying to concatenate json files into an object to use with i18next. I feel it's simple, I don't want to use overcomplicated solutions.</p>
  
  <p>I have a directory structure like </p>
  
  <blockquote>
    <p>messages/locale_name/domain_name.json</p>
  </blockquote>
  
  <p><strong>How can I import all the json files in a regular object in my code ?</strong></p>
  
  <p>So far, I'm struggling at the very beginning as I found suggestions which need to require('fs") but webpack tells me it cannot resolve the fs module and I've seen I can't install it as it is part of default node config.</p>
  
  <p>Some help appreciated.</p>
  
  <p>Thanks !</p>