Skip to content
Permalink
Browse files

Fallback on resolving TypeScript relatively (#793)

  • Loading branch information...
Maecenas authored and blakeembrey committed Mar 7, 2019
1 parent c2ecc7d commit 655c43b77fdc9784caac0bc3120455afe5e0cb8d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/index.ts
@@ -192,7 +192,7 @@ export function register (opts: Options = {}): Register {
// Require the TypeScript compiler and configuration.
const cwd = process.cwd()
const typeCheck = options.typeCheck === true || options.transpileOnly !== true
const compiler = require.resolve(options.compiler || 'typescript', { paths: [cwd] })
const compiler = require.resolve(options.compiler || 'typescript', { paths: [cwd, __dirname] })
const ts: typeof _ts = require(compiler)
const transformers = options.transformers || undefined
const readFile = options.readFile || ts.sys.readFile

0 comments on commit 655c43b

Please sign in to comment.
You can’t perform that action at this time.