From bbb339207af8d89046953def65cd97a736766c53 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Tue, 19 Dec 2017 11:20:12 +0200 Subject: [PATCH] refactor: Add options to the @ngtools/webpack loaders for workers support Loading the .ts files for WebWorkers using the @ngtools/webpack requires at least the tsConfigPath to be provided to the loader as options. --- templates/webpack.angular.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index 54925337..2830cb4e 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -68,7 +68,10 @@ module.exports = env => { { test: /\.scss$/, exclude: /\/app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] }, // Compile TypeScript files with ahead-of-time compiler. - { test: /.ts$/, use: ["nativescript-dev-webpack/moduleid-compat-loader", "@ngtools/webpack"] }, + { test: /.ts$/, use: [ + "nativescript-dev-webpack/moduleid-compat-loader", + { loader: "@ngtools/webpack", options: ngToolsWebpackOptions }, + ]}, ], }, plugins: [