From d268c551cc0cbe2f83f8cc9533ce5f636eda860a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Sep 2016 22:09:12 +0200 Subject: Client: update to angular 2.0 --- client/config/webpack.common.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'client/config') diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index 2ce44b6c7..88a3639d2 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js @@ -9,6 +9,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin const AssetsPlugin = require('assets-webpack-plugin') +const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin') const WebpackNotifierPlugin = require('webpack-notifier') /* @@ -202,6 +203,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. -- cgit v1.2.3