title: Angular WARNING in ./node_modules/@angular/core/fesm5/core.js?
body: <p>I keep getting these Warnings while deploying:</p>
  
  <pre><code>WARNING in ./node_modules/@angular/core/fesm5/core.js
  4996:15-36 Critical dependency: the request of a dependency is an expression
   @ ./node_modules/@angular/core/fesm5/core.js
   @ ./src/app/app.module.ts
   @ ./src/main.ts
   @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
  
  WARNING in ./node_modules/@angular/core/fesm5/core.js
  5008:15-102 Critical dependency: the request of a dependency is an expression
   @ ./node_modules/@angular/core/fesm5/core.js
   @ ./src/app/app.module.ts
   @ ./src/main.ts
   @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
  </code></pre>
  
  <p>What I've tried:</p>
  
  <p><a href="https://github.com/angular/angular/issues/20357" rel="noreferrer">https://github.com/angular/angular/issues/20357</a></p>
  
  <p>My project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/RTHxe.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/RTHxe.jpg" alt="enter image description here"></a></p>
  
  <p>My webpack.config.js:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var path = require('path');
  plugins: [
    new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/, path.join(__dirname, './src')),
    new HtmlWebpackPlugin({
      template: './src/index.html',
      filename: 'index.html',
      inject: 'body'
    }),
    new webpack.DefinePlugin({
      // global app config object
      config: JSON.stringify({
        apiUrl: 'http://localhost:4000'
      })
    })
  ],</code></pre>
  </div>
  </div>
  </p>