28
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Node.jsでもsource mapを使おうとしたらびっくりするくらい簡単だった

Last updated at Posted at 2014-03-23

まずは作業内容から。

必要なモジュールをインストールして、

npm install --save source-map-support

メソッド一つ叩けば出来上がり。

index.ts
require('source-map-support').install();

// 以下ユーザーコード
:
:

これだけ。

これでビルド時にsource mapを吐いておけば、スタックトレースは.tsでの行数が出ます。

28
25
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
28
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?