title: Extracting a javascript file from webpack build
body: <p>I am using webpack for a project where I need to have a javascript config file as part of the built files, but I cannot figure out how to do that.</p>
  
  <p>So I need to have these files in the output:</p>
  
  <p><code>index.html</code>
  <code>app.js</code>
  <code>config.js</code></p>
  
  <p>I figure I need to either: </p>
  
  <p>1) Copy the config.js file from the source folder to the build folder with CopyWebpackPlugin, or</p>
  
  <p>2) Include the file in the compiled bundle and then extract it with ExtractTextWebpackPlugin.</p>
  
  <p>I have tried dozens of different ways of configuring this, but when trying with the copy method, I get the file both inside the app.js bundle AND as a separate file. When I try with the extract method, I cannot seem to figure out how to extract javascript from the main bundle. The docs all seem to explain how to extract css.</p>
  
  <p>How would I go about something like this?</p>