From e777eba37f214a9d51e1beb80be7c0a40ce86bb7 Mon Sep 17 00:00:00 2001 From: Antony Budianto Date: Wed, 26 Oct 2016 08:09:16 +0700 Subject: [PATCH] fix(webpack): exclude spec files from aot --- packages/webpack/src/plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/webpack/src/plugin.ts b/packages/webpack/src/plugin.ts index 4105c3f7cdbb..f6e95d7b3b5b 100644 --- a/packages/webpack/src/plugin.ts +++ b/packages/webpack/src/plugin.ts @@ -102,7 +102,8 @@ export class AotPlugin { } const tsConfig = tsc.readConfiguration(options.tsConfigPath, basePath); - this._rootFilePath = tsConfig.parsed.fileNames; + this._rootFilePath = tsConfig.parsed.fileNames + .filter(fileName => !/\.spec\.ts$/.test(fileName)); // Check the genDir. let genDir = basePath;