Skip to content

Commit bb5be76

Browse files
authored
Merge pull request #276 from nogic1008/hotfix/transform-next
fix: convert SourceMapGenerator to RawSourceMap in next branch
2 parents 416c38e + 6a48f76 commit bb5be76

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,6 @@ module.exports = function(src, filename, config) {
144144

145145
return {
146146
code: output.code,
147-
map
147+
map: map && map.toJSON()
148148
}
149149
}

lib/utils.js

Lines changed: 3 additions & 2 deletions
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)