title: Creating one bundle file in create react app
body: <p>How do I set up a Create React App to make a single <code>myApp.js</code> and <code>myApp.css</code> file that can be moved where ever I need?</p>
  <p>Background:
  At my work we have two older websites in need of updating and both have a React app inside the multi page site. The React apps use Create React App. Not my choice of configuration, this is just what I have to work with and I can not change everything.</p>
  <p>Currently, when small changes are made to the site we build the bundled a take the final <code>myApp.js</code> and <code>myApp.css</code> files the CRA produce and moved these to the folder where the website expects them to be.</p>
  <p>It might be easier to understand it this way. The app builds the .js|.css bundle files here:</p>
  <blockquote>
  <p><code>../appA/someFolder/build/static/main.js</code> and <code>../appA/someFolder/build/static/main.css</code>.</p>
  </blockquote>
  <p>These files are then moved to here:</p>
  <blockquote>
  <p><code>../appA/hostThisSite/someFolder/js/main.js</code> and <code>../appA/hostThisSite/someFolder/css/main.css</code></p>
  </blockquote>
  <p>And for the second website it does the same yet moves the file to a whole other website structure</p>
  <blockquote>
  <p><code>../../appB/hostThisSite/someFolder/js/main.js</code> and <code>../../appB/hostThisSite/someFolder/css/main.css</code></p>
  </blockquote>
  <p>Currently we need to update the React app. And to do so I need to address that the new Create React App creates a bunch of files in the <code>/build/static/</code> folder (and they include hashes in the name and not <code>myApp.js</code> and <code>myApp.css</code>.)</p>
  <p>I have done research and the only thing I have come up with is this:
  <a href="https://www.labnol.org/code/bundle-react-app-single-file-200514" rel="nofollow noreferrer">https://www.labnol.org/code/bundle-react-app-single-file-200514</a>
  And the boss doesn't want me to use gulp.</p>