title: ReactJS + Chrome extension: Add background.js to build folder
body: <p>I'm trying to build a chrome extension with React.js. Right now, I'm testing my extension by running <code>yarn build</code> and then dragging the <code>build</code> folder into my chrome homepage and clicking on the extension to see the changes. </p>
  
  <p>However, I'm having a problem where I can't create a <code>background.js</code> file in the <code>build</code> folder in order to test some background events I need to respond to in my extension. The relevant <code>package.json</code> code is </p>
  
  <pre><code>"background": {
    "scripts": ["static/background.js"],
    "persistent": false
  },
  </code></pre>
  
  <p>I'm getting an error because <code>static/background.js</code> doesn't exist in my <code>static/</code> folder after building. Is there any way to have the <code>background.js</code> script appear in the build each time I run it, besides just copying the file in each time I run <code>yarn build</code>? Alternativley, is there a better way to test my react app as a chrome extension? </p>