From d824ca9acad657b6ee28a4621f045916b0ca63bb Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 30 Jun 2017 06:44:33 +0100 Subject: [PATCH 1/2] Speculative fix for #568 --- src/servicesHost.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servicesHost.ts b/src/servicesHost.ts index 1bc44554c..ddc0c201e 100644 --- a/src/servicesHost.ts +++ b/src/servicesHost.ts @@ -65,8 +65,8 @@ function makeServicesHost( directoryExists: compiler.sys ? ( compiler.sys).directoryExists : undefined, // The following three methods are necessary for @types resolution from TS 2.4.1 onwards see: https://github.com/Microsoft/TypeScript/issues/16772 - fileExists: moduleResolutionHost.fileExists, - readFile: moduleResolutionHost.readFile, + fileExists: compiler.sys ? ( compiler.sys).fileExists : undefined, + readFile: compiler.sys ? ( compiler.sys).readFile : undefined, readDirectory: compiler.sys ? ( compiler.sys).readDirectory : undefined, getCurrentDirectory: () => process.cwd(), From 3eeb38b29809e9679be8fc179f0dad96d1980fb5 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 30 Jun 2017 10:16:54 +0100 Subject: [PATCH 2/2] Remove default of setting isolatedModules to true when in transpileOnly mode Not useful for when using ts-loader with fork-ts-checker-webpack-plugin. Can still be set manually with tsconfig.json if desired and so arguably not a breaking change --- src/config.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8b7b5af4e..764e45e25 100644 --- a/src/config.ts +++ b/src/config.ts @@ -54,11 +54,6 @@ export function getConfigFile( configFile.config.compilerOptions = Object.assign({}, configFile.config.compilerOptions, loaderOptions.compilerOptions); - - // do any necessary config massaging - if (loaderOptions.transpileOnly) { - configFile.config.compilerOptions.isolatedModules = true; - } } return {