Skip to content

Commit

Permalink
feat: Add TypeScript local resolving
Browse files Browse the repository at this point in the history
Fix and extend #765
  • Loading branch information
Maecenas authored Mar 3, 2019
1 parent c2ecc7d commit 2d57c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d57c9a

Please sign in to comment.