Skip to content

Commit 25e320e

Browse files
yushijie1Single-Dancer
authored andcommitted
fix(debugger): 解决jsvm debugger能力sourcemap映射问题
1 parent 9e7250a commit 25e320e

File tree

1 file changed

+2
-0
lines changed
  • packages/taro-vite-runner/src/harmony

1 file changed

+2
-0
lines changed

packages/taro-vite-runner/src/harmony/babel.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default (viteCompilerContext: ViteHarmonyCompilerContext): PluginOption =
1414
if (/(\.(et|j|t)sx?|\.vue)$/.test(id.split('?')[0])) {
1515
const result = transformSync(code, {
1616
filename: id,
17+
sourceMaps: true,
1718
plugins: [
1819
[
1920
function renameImportPlugin (babel: typeof BabelCore): BabelCore.PluginObj<BabelCore.PluginPass> {
@@ -75,6 +76,7 @@ export default (viteCompilerContext: ViteHarmonyCompilerContext): PluginOption =
7576
// TODO 后续考虑使用 SWC 插件的方式实现
7677
const result = await transformAsync(code, {
7778
filename: id,
79+
sourceMaps: true,
7880
plugins: [
7981
[
8082
require('babel-plugin-transform-taroapi'),

0 commit comments

Comments
 (0)