Include JSON file to build/output directory without import
<p>Maybe the title is a bit strange, but I can't seem to find anything about on google.</p>

<p><strong>Question</strong>: I have a folder that only contains .ts files and .json files.. Typescript compiles the .ts files and puts it into a separate directory (not as a bundle, just the directory structure 'as-is').</p>

<p>Src /</p>

<p>&nbsp;&nbsp;&nbsp;Workers / </p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ModuleA.ts, ModuleA.json],</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ModuleB.ts, ModuleB.json],</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[MobuleC.ts, ModuleC.json]</p>

<p>Most of the time I can just require('*.json') and the JSON file will be also placed in to build directory.</p>

<p>But now I have a situation, where importing the JSON will make no sense, because the JSON file gets updated every few seconds and I read the file with fs.readFile('*.json'), so I also don't want it floating around in the v8 cache (through require)</p>

<p>So how do I 'include' a JSON/None-Typescript file into the build, that is not explicitly being importing by either require or import?</p>

<hr>

<p>For now I just used gulp to copy every .json file in the src folder over to the the respective dist/** folder.</p>

<p>But still find it strange typescript doesn't have something included for it..</p>