简体   繁体   中英

When using typescript framework all sources are compiled in node_modules

I am used to have possibility to go to source code of framework when I am using it. So I tried to install nestjs which is written in typescript. After following the instructions on how to generate a new app I noticed that all the sources for that framework in node_modules/@nestjs are already compiled to javascript and it's impossible to view actual typescript source code.

Is there any way to enable view for source code of typescript packages?

You can't view the typescript in node_modules because when a typescript package is published, if a developer is publishing it properly, they are publishing the compiled JavaScript. The only Typescript that gets published should be the d.ts file for typings. To view the raw source code, find the project on GitHub. Otherwise, the compiled JavaScript is always available in node_modules .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM