From d812d5d0484109a11c9293f823507006a68ce211 Mon Sep 17 00:00:00 2001 From: Stanimira Vlaeva Date: Mon, 17 Sep 2018 14:20:10 +0300 Subject: [PATCH] fix(angular): AoT rebuild on template and style changes (#659) * fix(angular): rebuild on ngfactory/ngstyle change The @ngtools/webpack should be applied to ngfactory and ngstyle files and not only to TS files. fixes #641 * refactor: remove obsolete comment --- templates/webpack.angular.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index 8fe26743..bf2aa817 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -183,9 +183,9 @@ module.exports = env => { { test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" }, { test: /\.scss$/, exclude: /[\/|\\]app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] }, - // Compile TypeScript files with ahead-of-time compiler. { - test: /.ts$/, use: [ + test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, + use: [ "nativescript-dev-webpack/moduleid-compat-loader", "@ngtools/webpack", ]