Closed Nasicus closed 6 years ago
Hi @Nasicus,
about the debugging, it seems an Angular CLI issue: https://github.com/angular/angular-cli/issues/5477 or can you see the .ts files of the Angular packages?
Regarding your second request: you can adapt it to a non-Angular library: just replace the compiler, and the related compilation options.
Hey @robisim74
Thanks for the quick answer. Well I can debug the app.ts
(it's where I put my debugger
statement). Didn't test further.
But if you say that it normally works that's enough for me, since I won't have an angular app anyway :)
Hi
I have two questions:
Debug Typesript
It's important for me that you can debug the typescript sources when you use "my" npm package.
I cloned this repo, executed
npm run build
andnpm run pack:lib
. Then I used the angular quickstart-project (https://angular.io/generated/zips/cli-quickstart/cli-quickstart.zip) and in there rannpm install my-library.tgz
. This all worked perfectly. I then used the theSumService
and the app component and rannpm start
. Still everything's working just fine. Then I debugged the code of my app component (in chrome) and went "into" theSumService
. Now instead of using thets
file the debugger went into thejs
file (webpack:///...cli-quickstartTEST/node_modules/angular-library-starter/esm5/angular-library-starter.js
) even though the.js.map
file is right there next to the other file. What could be the problem here? Is there a misconfiguration? Or do you need to configure anything special?Not Angular packages
This is maybe a little strange: But do you think this repo is a good starting point for non-angular packages? This project here just seems as a very clean and good starting point, that's why I'm thinking of using it :) If yes: Are there any particular points which are important / must be considered? If no: Do you know any other good sample project without angular? ;)
Thanks in advance