frankwallis / plugin-typescript

TypeScript loader for SystemJS
MIT License
248 stars 47 forks source link

Source map files have incorrect path locations #193

Open pietschy opened 7 years ago

pietschy commented 7 years ago

Hi there, I'm getting the wrong path information being generated in my source map files. Details are:

Versions:

jspm@0.17.0-beta.40 systemjs@0.20.9 Dev plugin-typscript@7.0.4 typescript@2.1.4 (and I also tried with 2.2.0 with the same outcome)

Config

Result

The sources: entry in app.map.js has:

Any ideas?

frankwallis commented 7 years ago

I think this could be due to the rootDirs option, what exactly is it for? As this setting is related to module resolution, and runtime module resolution is handled entirely by systemjs, it may be that the plugin should not pass this option through when transpiling files.

Have you tried using the paths option instead?

frankwallis commented 7 years ago

Also see https://github.com/Microsoft/TypeScript/issues/12246 as it sounds very similar.

pietschy commented 7 years ago

Excellent, thanks for the pointers. I'll dig a bit further into the documentation and make sure I'm not just confused about how it should work.