I have js and jsx files which produced by typescript targets to es6. That files contains source maps, produced by typescript too. I want to pass that files to babel. Everything goes fine, except source maps. Babel does not pick up existing source maps and produces the new one. Is there any way to tell it to take existing source maps?
Asked
Active
Viewed 125 times
2
-
What does your build pipeline look like? – loganfsmyth Apr 11 '16 at 17:26
-
Why not just make typescript output ES5? – Bergi Apr 11 '16 at 17:36
-
possible duplicate of [Combine source maps of two compilation steps](http://stackoverflow.com/q/21709341/1048572) (or one of the questions linked there) – Bergi Apr 11 '16 at 17:38
-
@loganfsmyth I simple invoke cli commands: `tsc --outDir /path/to/target` and then `babel /path/to/target --out-dir /path/to.es5/target`. – Artur Eshenbrener Apr 11 '16 at 17:40
-
@Bergi because babel supports more features, for example typescript has no supports `async/await` with es5 targets. Also, I want to use `rollup` for tree-shaking, and I need to use it with es6 modules – Artur Eshenbrener Apr 11 '16 at 17:42
-
@Bergi thank you, I'll check that. – Artur Eshenbrener Apr 11 '16 at 17:43