title: webpack & babel-polyfill: Can't resolve 'core-js/modules/es6.array.map' in source directory
body: <p>I'm facing this error when I execute <code>webpack</code>:</p>
  
  <pre><code>Module not found: Error: Can't resolve 'core-js/modules/es6.array.map' in '/path/to/project/src'
   @ ./src/index.ts 1:0-39
  </code></pre>
  
  <p><code>index.ts</code>:</p>
  
  <pre><code>console.log([1, 2, 3].map(x =&gt; x * x));
  </code></pre>
  
  <p><code>.babelrc</code>:</p>
  
  <pre><code>{
    "presets": [
      [
        "@babel/preset-env",
        {
          "useBuiltIns": "usage"
        }
      ]
    ]
  }
  </code></pre>
  
  <p><code>webpack.config.js</code>:</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
    mode: 'development',
  
    entry: './src/index.ts',
    devtool: false,
    output: {
      filename: 'bundle.js',
      path: path.join(__dirname, 'dist')
    },
    module: {
      rules: [
        {
          test: /\.ts$/,
          use: [
            { loader: 'babel-loader' },
            { loader: 'ts-loader' }
          ]
        }
      ]
    },
    resolve: {
      extensions: [
        '.ts'
      ]
    }
  };
  
  </code></pre>
  
  <p>I think it's very weird that the error is trying to resolve the module in <code>src/</code>, not <code>node_modules/</code>.</p>
  
  <p>I tried removing <code>node_modules</code> and <code>package.json</code> and then <code>npm i</code>, but it didn't change the situation.</p>
  
  <p>I also tried another way to use <code>@babel/polyfill</code> described <a href="https://babeljs.io/docs/en/babel-polyfill" rel="noreferrer">here</a>.</p>
  
  <p>Setting <code>useBuiltIns</code> to <code>'entry'</code> just increased the number of similar errors. Setting it to <code>false</code> caused different errors.</p>
  
  <pre><code>Module not found: Error: Can't resolve 'core-js/es6' in '/path/to/project/node_modules/@babel/polyfill/lib'
   @ ./node_modules/@babel/polyfill/lib/index.js 3:0-22
   @ multi @babel/polyfill ./src/index.ts
  
  ERROR in ./node_modules/@babel/polyfill/lib/index.js
  Module not found: Error: Can't resolve 'regenerator-runtime/runtime' in '/path/to/project/node_modules/@babel/polyfill/lib'
   @ ./node_modules/@babel/polyfill/lib/index.js 23:0-38
   @ multi @babel/polyfill ./src/index.ts
  </code></pre>
  
  <p>It seems <code>core-js</code> and <code>regenerator-runtime</code> should be installed in <code>node_modules/@babel/polyfill/</code>. Currently, there are only <code>index.js</code> and <code>noConflict.js</code> in the directory. Do I have to manually install those modules in this directory?</p>