From 25269f71e12c1565d07b2855de8e1e849397d308 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Fri, 22 Dec 2017 15:37:06 +0200 Subject: [PATCH] refactor: remove tsconfig.aot.json --- app/vendor-platform.ios.ts | 2 -- tsconfig.aot.json | 7 ------- webpack.config.js | 7 +++++-- 3 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 tsconfig.aot.json diff --git a/app/vendor-platform.ios.ts b/app/vendor-platform.ios.ts index 8647871b..cedec656 100644 --- a/app/vendor-platform.ios.ts +++ b/app/vendor-platform.ios.ts @@ -1,4 +1,2 @@ -// There is a bug in angular: https://github.com/angular/angular-cli/pull/8589/files -// Legendary stuff, its webpack plugin pretty much doesn't work with empty TypeScript files in v1.8.3 /* tslint:disable:no-unused-expression */ void 0; diff --git a/tsconfig.aot.json b/tsconfig.aot.json deleted file mode 100644 index 7e629198..00000000 --- a/tsconfig.aot.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig", - "angularCompilerOptions": { - "skipMetadataEmit": true, - "genDir": "./" - } -} diff --git a/webpack.config.js b/webpack.config.js index 54925337..c87d0198 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,7 +15,7 @@ module.exports = env => { } const platforms = ["ios", "android"]; const { snapshot, uglify, report, aot } = env; - const ngToolsWebpackOptions = { tsConfigPath: aot ? "tsconfig.aot.json" : "tsconfig.json"}; + const ngToolsWebpackOptions = { tsConfigPath: "tsconfig.json" }; const config = { context: resolve("./app"), @@ -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: [