generator-angular2-library icon indicating copy to clipboard operation
generator-angular2-library copied to clipboard

SourceMaps Support?

Open dougellison opened this issue 7 years ago • 5 comments

I've got the demo up and running for generating the sample-library and linked into an angular-cli app and can't get source mapping at all.

Steps mkdir new-toolbar cd new-toolbar yo angular2-library npm run build cd dist npm link cd ../../new-app npm link new-toolbar ng serve --preserve-symlinks (angular-cli based) App Runs. Open Chrome Debugger -> Ctrl+0 SampleCompnent I only get the option of SampleComponent.ngfactory.ts which is really difficult to debug.

Also I have to use ng serve --preserve link to get the angular-cli app to run. This has the sad by-product of not allowing npm run build:watch in the component to affect the main app with updates.

Thoughts / Help?

dougellison avatar Aug 31 '17 18:08 dougellison

+1 Now it seems that we can't npm link the src directory. I don't know how to debug my library project if sourcemap doesn't work.

sishuoyang avatar Dec 11 '17 07:12 sishuoyang

Hi, any progress on this?

endamaco avatar May 10 '18 08:05 endamaco

To generate sourceMap files in order to debug : try to add "sourceMap": true in the tsconfig.es5.json file under the compilerOptions section .

DhiaEddineSaidi avatar May 10 '18 13:05 DhiaEddineSaidi

@dougellison @sheldonyss — Would you be able to try @DhiaEddineSaidi's suggestion to enable source maps?

jvandemo avatar May 10 '18 14:05 jvandemo

+1 need support source maps @jvandemo i tried "sourceMap": true some map files generated, but not reflected in debugger only see my umd.js file

chesminsky avatar Aug 29 '18 10:08 chesminsky