Skip to content

Commit 251ce2a

Browse files
committed
Add fallback for tsconfig api
- pick from vuejs#246
1 parent 98c5d81 commit 251ce2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/utils.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ const getBabelOptions = function loadBabelOptions(filename, options = {}) {
6666
const getTsJestConfig = function getTsJestConfig(config) {
6767
const createTransformer = require('ts-jest').createTransformer
6868
const tr = createTransformer()
69-
const { typescript } = tr.configsFor(config)
69+
const configSet = tr.configsFor(config)
70+
const tsConfig = configSet.typescript || configSet.parsedTsConfig
7071
// Force es5 to prevent const vue_1 = require('vue') from conflicting
71-
return { compilerOptions: { ...typescript.options, target: 'es5' } }
72+
return { compilerOptions: { ...tsConfig.options, target: 'es5' } }
7273
}
7374

7475
function isValidTransformer(transformer) {

0 commit comments

Comments
 (0)