From 8dd616f4a8cb4f5a2f55e22a228a8c1a198f4692 Mon Sep 17 00:00:00 2001 From: jonathanmourtada Date: Sat, 18 Mar 2017 18:49:44 +0100 Subject: [PATCH] Show warning when missing config. #6 --- src/config-loader.ts | 1 - src/register.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config-loader.ts b/src/config-loader.ts index a09eab0..8e81199 100644 --- a/src/config-loader.ts +++ b/src/config-loader.ts @@ -30,7 +30,6 @@ export function configLoader({ }: ConfigLoaderParams): ConfigLoaderSuccessResult | ConfigLoaderFailResult { if (explicitParams) { - const absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path.join(cwd, explicitParams.baseUrl); diff --git a/src/register.ts b/src/register.ts index 43713b9..b167fec 100644 --- a/src/register.ts +++ b/src/register.ts @@ -11,7 +11,8 @@ export function register(explicitParams: ExplicitParams) { }); if (configLoaderResult.resultType === "failed") { - throw new Error(configLoaderResult.message); + console.warn(`${configLoaderResult.message}. tsconfig-paths will be skipped`); + return; } const matchPath = createMatchPath(