title: Craco build fails, taking aliased folder as external package
body: <p>I'm using craco and craco-alias to implement aliases for imports in my Create React App project.
  Followed instructions in <a href="https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#installation" rel="nofollow noreferrer">https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#installation</a> and <a href="https://github.com/risenforces/craco-alias#readme" rel="nofollow noreferrer">https://github.com/risenforces/craco-alias#readme</a>
  I configured package.json to use craco instead of react-scripts for starting dev server, tests and production build</p>
  
  <pre><code>...
  "scripts": {
      "start": "craco start",
      "build": "craco build",
      "test": "craco test",
      "lint:css": "stylelint './src/**/*.css'",
      "lint:js": "eslint 'src/**/*.js'",
      "test:w": "craco test --watch",
      "postinstall": "patch-package"
    },
  ...
  </code></pre>
  
  <p>Then I created jsconfig.json file w aliases paths</p>
  
  <pre><code>  "compilerOptions": {
      "baseUrl": "./src",
      "paths": {
        "@components": ["components/*", "components"],
        "@constants": ["constants/*", "constants"],
        "@assets": ["assets/*", "assets"],
        "@store": ["store/*", "store"],
        "@utils": ["utils/*", "utils"]
      },
      "include": ["src"],
      "exclude": ["node_modules", "build", "coverage"]
    }
  </code></pre>
  
  <p>And craco.config.js file, which uses craco-alias plugin</p>
  
  <pre><code>/* craco.config.js */
  const CracoAlias = require('craco-alias');
  
  module.exports = {
    plugins: [
      {
        plugin: CracoAlias,
        options: {
          baseUrl: './src',
          source: 'jsconfig',
        }
      }
    ]
  }
  </code></pre>
  
  <p>Now I'm using aliases for imports in my app like this</p>
  
  <pre><code>// root index.js file
  ...
  
  import Layout from '@components/Layout';
  import store from '@store'; // this line causes error on CI build
  
  
  function App() {
    return (
      &lt;Layout&gt;
       /* inner components */
      &lt;/Layout&gt;
    );
  }
  </code></pre>
  
  <p>Everything works fine (aliased imports works on dev-server, in jest tests and even if I serve locally built project) until I push it to github repo. That repo has configured github actions to build and test project on remote server and it fails with error on build step, after installing all packages.</p>
  
  <pre><code>Run yarn build
  yarn run v1.22.4
  $ craco build
  Creating an optimized production build...
  Browserslist: caniuse-lite is outdated. Please run next command `npm update`
  Failed to compile.
  
  ./src/index.js
  Cannot find module: '@store'. Make sure this package is installed.
  
  You can install this package by running: npm install @store.
  
  
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  ##[error]Process completed with exit code 1.
  </code></pre>
  
  <p>Could somebody help me understand what wrong with my code? Why craco or webpack expect '@store' to be external package instead of aliased import of internal module?</p>