jvandemo / generator-angular2-library

Yeoman generator to create an Angular library
MIT License
752 stars 122 forks source link

SourceMaps Support? #180

Open dougellison opened 7 years ago

dougellison commented 7 years ago

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?

sishuoyang commented 6 years ago

+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.

endamaco commented 6 years ago

Hi, any progress on this?

DhiaEddineSaidi commented 6 years ago

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

jvandemo commented 6 years ago

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

chesminsky commented 6 years ago

+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