Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Fixed mapping to original file in sourcemap#71

Merged
guybedford merged 1 commit intosystemjs:masterfrom
mpfau:master
Nov 11, 2016
Merged

Fixed mapping to original file in sourcemap#71
guybedford merged 1 commit intosystemjs:masterfrom
mpfau:master

Conversation

@mpfau
Copy link
Copy Markdown
Contributor

@mpfau mpfau commented Nov 9, 2016

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

babel swallows the path of the source file if `sourceFileName` is not defined.
@guybedford
Copy link
Copy Markdown
Member

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

@mpfau
Copy link
Copy Markdown
Contributor Author

mpfau commented Nov 11, 2016

Sure! :-)

Environment:

  • "systemjs": "0.19.40",
  • "systemjs-builder": "0.15.33",
  • "systemjs-plugin-babel": "0.0.17",

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 guybedford merged commit cfd276f into systemjs:master Nov 11, 2016
@guybedford
Copy link
Copy Markdown
Member

Sure thanks for clarifying!

@guybedford
Copy link
Copy Markdown
Member

Released in 0.0.18.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants