Skip to content

Commit 4eb19bc

Browse files
authored
Merge pull request #250 from vuejs/lachlan/force-es5
Force ES5 for TS compilation
2 parents 6b47660 + b287fed commit 4eb19bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ const getTsJestConfig = function getTsJestConfig(config) {
6767
const createTransformer = require('ts-jest').createTransformer
6868
const tr = createTransformer()
6969
const { typescript } = tr.configsFor(config)
70-
return { compilerOptions: typescript.options }
70+
// Force es5 to prevent const vue_1 = require('vue') from conflicting
71+
return { compilerOptions: { ...typescript.options, target: 'es5' } }
7172
}
7273

7374
function isValidTransformer(transformer) {

0 commit comments

Comments
 (0)