Is there source map support for typescript in node / nodemon?

前端 未结 5 2052
盖世英雄少女心
盖世英雄少女心 2021-01-31 14:34

I have a node project written in typescript@2.

My tsconfig has sourceMap set to true and the *.map.js files are generated. When I

5条回答
  •  生来不讨喜
    2021-01-31 15:08

    I found this npm module which seems to do the trick:

    https://github.com/evanw/node-source-map-support

    run npm install source-map-support --save at the root of your node project and add import 'source-map-support/register' to your main.ts or index.ts file.

    That's it.

提交回复
热议问题