# HG changeset patch # User Andrew Azores # Date 1508166575 14400 # Node ID 70b4d54655aff2506e77e1745a1181357666d30c # Parent c64e2518bae5141f9c71277c2f7a01f25ebf73c6 Use ContextReplacementPlugin to avoid "critical dependency" build warning Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025395.html diff -r c64e2518bae5 -r 70b4d54655af webpack.config.js --- a/webpack.config.js Fri Oct 13 14:17:45 2017 -0400 +++ b/webpack.config.js Mon Oct 16 11:09:35 2017 -0400 @@ -120,6 +120,14 @@ config.plugins = []; + // see https://github.com/angular/angular/issues/11580#issuecomment-327338189 + config.plugins.push( + new webpack.ContextReplacementPlugin( + /(.+)?angular(\\|\/)core(.+)?/, + path.join(__dirname, 'src') + ) + ); + config.plugins.push( new webpack.ProvidePlugin({ $: 'jquery',