<h2 dir="auto">Feature request</h2>





<p dir="auto"><strong>What is the expected behavior?</strong><br>
If you do "webpack --watch" it's currently only detecting and recompiling when existing files are changed.</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br>
I want to be able to drop new jsx files into the source directory tree, and have them automatically be compiled into the output tree.</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong><br>
Every directory and subdirectory would have to be watched for new files (in addition to current behavior).  The new feature doesn't necessarily need to support files in new directories that are created after webpack is launched, if that's harder (it probably is).</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
yes</p>
<h2 dir="auto">Feature request</h2>





<p dir="auto"><strong>What is the expected behavior?</strong><br>
Currently, there is no way to tell Webpack to watch additional paths for changes when using <code class="notranslate">watch</code>.  It would be nice if this was possible.</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br>
In one of my projects I use <code class="notranslate">BannerPlugin</code> to add some text to the top of my Webpack bundle. This text is stored in a separate file; in my <code class="notranslate">webpack.config.js</code> I use</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="plugins: [
	new webpack.BannerPlugin({
		banner: fs.readFileSync('./my_text_file').toString(),
		..."><pre class="notranslate"><span class="pl-s1">plugins</span>: <span class="pl-kos">[</span>
	<span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">BannerPlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
		<span class="pl-c1">banner</span>: <span class="pl-s1">fs</span><span class="pl-kos">.</span><span class="pl-en">readFileSync</span><span class="pl-kos">(</span><span class="pl-s">'./my_text_file'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
		...</pre></div>
<p dir="auto">to pass the banner text into <code class="notranslate">BannerPlugin</code>. But Webpack doesn't watch that file, so changes to it don't trigger a rebuild.</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong><br>
With a new <code class="notranslate">watchOptions.additional</code> option, with usage equivalent to <code class="notranslate">watchOptions.ignored</code>.</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
yes, but not sure where to look</p>