systemjs / plugin-babel

SystemJS Babel Plugin
MIT License
82 stars 33 forks source link

Fixed mapping to original file in sourcemap #71

Closed mpfau closed 8 years ago

mpfau commented 8 years ago

babel swallows the path of the source file if sourceFileName is not defined.

guybedford commented 8 years ago

Thanks for posting. Can you clarify a little more how this alters the source map / output?

mpfau commented 8 years ago

Sure! :-)

Environment:

Before applying the patch, the relative path to the sources was missing for all files transpiled with plugin-babel: "sources":["classCallCheck.js","cjs.js","es6.js"]

This made it impossible for the browser to find the original source files. The same section looks as follows, after applying the patch: "sources":["node_modules/systemjs-plugin-babel/babel-helpers/classCallCheck.js","src/cjs.js","src/es6.js"]

guybedford commented 8 years ago

Sure thanks for clarifying!

guybedford commented 7 years ago

Released in 0.0.18.