Skip to content

Commit

Permalink
fix: Angular2 dependency warning (PatrickJS#998)
Browse files Browse the repository at this point in the history
* fix: Angular2 RC7 dependency warning

* ~ minor syntactic change

LGTM

* Update webpack.common.js
  • Loading branch information
Simon-Briggs authored and PatrickJS committed Sep 17, 2016
1 parent 58377b9 commit 654d582
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/webpack.common.js
Expand Up @@ -14,6 +14,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
const HtmlElementsPlugin = require('./html-elements-plugin');
const AssetsPlugin = require('assets-webpack-plugin');
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');

/*
* Webpack Constants
Expand Down Expand Up @@ -222,6 +223,19 @@ module.exports = function(options) {
name: ['polyfills', 'vendor'].reverse()
}),

/**
* Plugin: ContextReplacementPlugin
* Description: Provides context to Angular's use of System.import
*
* See: https://webpack.github.io/docs/list-of-plugins.html#contextreplacementplugin
* See: https://github.com/angular/angular/issues/11580
*/
new ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators in *nix and Windows
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
helpers.root('src') // location of your src
),

/*
* Plugin: CopyWebpackPlugin
* Description: Copy files and directories in webpack.
Expand Down

0 comments on commit 654d582

Please sign in to comment.