LoginSignup
0
0

More than 1 year has passed since last update.

jestでswcを使うようにしたらエラー文に出てくる行数と実際のソースの行数が合わなくなったので解消させた

Posted at

日本語の記事が見つからなかったので投稿

概要

swcを使いだしてからエラー文のstackに出てくるソースコードの行数がずれる様になりました。
sourceMapは有効化しているはずなので何かがおかしいと思い調べてみました。

状況

  • sourceMapは有効化している
{
  "sourceMaps": true
}

解決方法

{
  "sourceMaps": "inline"
}

または(未検証)

{
  "sourceMaps": true,
  "inlineSourcesContent": true
}

参考

https://github.com/swc-project/swc/issues/1581
https://github.com/swc-project/swc/issues/2194

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0