From c34213ad15069aa5a910a15679f4d69e484c95e8 Mon Sep 17 00:00:00 2001 From: Mathias Vestergaard Date: Mon, 8 Jul 2019 12:02:01 +0200 Subject: [PATCH] Fix import causing issues when compiled to commonjs (#2126) --- packages/graphql-codegen-cli/src/utils/watcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphql-codegen-cli/src/utils/watcher.ts b/packages/graphql-codegen-cli/src/utils/watcher.ts index 6c14e817187..7a098e04d00 100644 --- a/packages/graphql-codegen-cli/src/utils/watcher.ts +++ b/packages/graphql-codegen-cli/src/utils/watcher.ts @@ -6,7 +6,7 @@ import * as isGlob from 'is-glob'; import * as logSymbols from 'log-symbols'; import { debugLog } from './debugging'; import { getLogger } from './logger'; -import path from 'path'; +import { join } from 'path'; function log(msg: string) { // double spaces to inline the message with Listr @@ -64,7 +64,7 @@ export const createWatcher = (config: Types.Config, onNext: (result: Types.FileO if (entry.config.preset) { const extension = entry.config.presetConfig && entry.config.presetConfig.extension; if (extension) { - ignored.push(path.join(entry.filename, '**', '*' + extension)); + ignored.push(join(entry.filename, '**', '*' + extension)); } } else { ignored.push(entry.filename);