Critical dependency: the request of a dependency is an expression (core.es5.js)

I'm working with angular 4.4.6 and webpack 3.10.0 and I get the following warning:

WARNING in ./node_modules/@angular/core/@angular/core.es5.js
2885:201-222 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/@angular/core/@angular/core.es5.js
 @ ./ClientApp/boot.browser.ts
 @ multi event-source-polyfill webpack-hot-middleware/client?path=__webpack_hmr&dynamicPublicPath=true babel-polyfill ./ClientApp/boot.browser.ts

I can find many posts with similar problems but I don't really know how to apply these solutions to my case. But it looks like it has something to do with the ContextReplacementPlugin.

In my webpack.config.vendor.js I have the two following lines:

new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp'))
new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp'))

Any help would be appreciated!!