title: How to set alias path via webpack in CRA (create-react-app) and craco?
body: <p>I have a problem on set <em>webpack</em> alias path using <em>create-react-app</em> and <a href="https://www.npmjs.com/package/@craco/craco" rel="noreferrer"><em>craco</em></a>, already googling it but can't solve the problem.</p>
  <p>I got an error <code>Module not found: Can't resolve '@app/App' in 'C:\ReactSandbox\my-project\src</code> everytime i run application using command <code>yarn start</code></p>
  <h2>Steps to reproduce:</h2>
  <ol>
  <li><code>create-react-app my-project</code></li>
  <li><code>cd my-project</code></li>
  <li><code>yarn add @craco/craco</code></li>
  <li><code>cat &gt; craco.config.js</code> <em>(see configuration below)</em></li>
  <li>replace <code>react-scripts</code> to <code>craco</code> on 'script' section on package.json <em>(craco start, craco build, etc)</em></li>
  <li>edit file <code>src/index.js</code> <em>(replace line 4, see code below)</em></li>
  <li><code>yarn start</code></li>
  </ol>
  <h3>craco.config.js</h3>
  <pre class="lang-js prettyprint-override"><code>const path = require(&quot;path&quot;);
  
  module.exports = {
    webpack: {
      resolve: { 
        alias: {
          &quot;@app&quot;: path.resolve(__dirname, &quot;src/&quot;),
        }
      }    
    }
  };
  </code></pre>
  <h3>src/index.js</h3>
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import './index.css';
  import App from '@app/App'; //replace './App' into '@app/App'
  import * as serviceWorker from './serviceWorker';
  
  ReactDOM.render(&lt;App /&gt;, document.getElementById('root'));
  
  serviceWorker.unregister();
  </code></pre>
  <hr />
  <h3>Current result</h3>
  <p><code>Module not found: Can't resolve '@app/App' in 'C:\ReactSandbox\my-project\src</code></p>
  <h3>Expected</h3>
  <p>I'm avoiding call relative path hell, instead of import module like <code>../../../../FilterComment.js</code>, it would be clean to write <code>@app/FilterComment.js</code></p>