title: setting environment variables to modify package.json for create-react-app
body: <p>I discovered today the use of environment variables in React, and I love it ! Especially using react-router, and filling up the <code>basename</code> attribute of the <code>&lt;BrowserRouter&gt;</code> component this way : </p>
  
  <pre><code>&lt;BrowserRouter basename={`${process.env.REACT_APP_BASENAME}`}&gt;
  &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>It's great, but I would like to use the variable <code>REACT_APP_BASENAME</code> also in <code>package.json</code> file, because as you know, the <code>"homepage"</code> line in <code>package.json</code> define the <code>PUBLIC_URL</code> variable used in <code>index.html</code> as <code>%PUBLIC_URL%</code>, and I would like this <code>PUBLIC_URL</code> to be equal to my <code>REACT_APP_BASENAME</code> variable. I think I would need something like that :</p>
  
  <p><code>package.json</code> :</p>
  
  <pre><code>{
    "name": "apoc",
    "version": "0.1.0",
    "private": true,
    "homepage": "%REACT_APP_BASENAME%",
    "dependencies": {....
  </code></pre>
  
  <p>Is it possible ?</p>