Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.37k stars 431 forks source link

Wrong source maps in 'template-typescript' version #250

Closed jdin closed 6 years ago

jdin commented 6 years ago

The lines do not match in typescript files and that makes it impossible to debug. Would you consider to fix it?

abdonrd commented 6 years ago

I have the same issue!

keanulee commented 6 years ago

The source maps are generated by tsc, so not sure what we can do...

jdin commented 6 years ago

would it be an option to combine ts with webpack or parcel?

jdin commented 6 years ago

Or maybe you have plans to integrate ts compilation in polymer build?

keanulee commented 6 years ago

Oh right, because we (polymer serve) does rewrites (e.g. package names to paths). I have an old experimental branch that shows how to get webpack working with master branch (warning: it's not pretty) - you could probably extend that to TS.

TS compilation in polymer build sounds nice but would be pretty far down our priorities.

keanulee commented 6 years ago

Thinking in the meanwhile we'll just disable sourcemaps.

jdin commented 6 years ago

I have found today 2 hours to make a small example of LitElement with TypeScript and Webpack based on experimental branch you have provided. Although it does not make a PWA build yet. But it does make correct source mappings :). So it can be helpful for the guys who use TypeScript with LitElement now.

keanulee commented 6 years ago

Glad to see the webpack configuration sort of worked.

Closing since source maps are no longer generated used in template-typescript.

abdonrd commented 6 years ago

Link to tools issue: https://github.com/Polymer/tools/issues/389