!3845 emit add return meta

Merge pull request !3845 from 李欣楠/emitCallBackAddMeta_master
This commit is contained in:
openharmony_ci 2024-10-18 08:09:53 +00:00 committed by Gitee
commit 46d31bc087
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -466,7 +466,10 @@ async function transform(code: string, id: string) {
return shouldEmitJsFlag ? {
code: emitResult.outputText,
// Use magicString to generate sourceMap because of Typescript do not emit sourceMap in some cases
map: emitResult.sourceMapText ? JSON.parse(emitResult.sourceMapText) : new MagicString(code).generateMap()
map: emitResult.sourceMapText ? JSON.parse(emitResult.sourceMapText) : new MagicString(code).generateMap(),
meta: {
shouldEmitJs: shouldEmitJsFlag
}
} : printSourceFile(transformResult.transformed[0], compilationTime);
}