New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect babel sourceMaps option #158

Merged
merged 1 commit into from Jun 25, 2017

Conversation

Projects
None yet
4 participants
@dwickern
Copy link
Contributor

dwickern commented Jun 19, 2017

The babel.sourceMaps option stopped working since the switch to ember-cli-babel. The option is used to enable ES6 sources in the debugger.

This PR enables sourceMaps under the ember-cli-babel.sourceMaps config option and also babel.sourceMaps for backwards compatibility.

Originally implemented in ember-cli/ember-cli#6458
Fixes (again) ember-cli/ember-cli#6066

index.js Outdated

let options = {
annotation: providedAnnotation || `Babel: ${this._parentName()}`
annotation: addonOptions.annotation || `Babel: ${this._parentName()}`,
sourceMaps: addonOptions.sourceMaps || babelOptions.sourceMaps

This comment has been minimized.

@rwjblue

rwjblue Jun 19, 2017

Member

Hmm, I'm not sure that we should do this sort of fallback. Each option needs to have a single place to live, if we have to support both locations one should be deprecated.

This comment has been minimized.

@dwickern

dwickern Jun 19, 2017

Author Contributor

I thought babel was deprecated. At least, I remember fixing a deprecation error when I upgraded to ember-cli 2.12

This comment has been minimized.

@rwjblue

rwjblue Jun 19, 2017

Member

Both are still valid, but each of them for different types of options.

At this point, I would say that sourceMaps should go in babel config (since we do pass it through directly to babel itself), and that we shouldn't allow it to be specified in options['ember-cli-babel'].

This comment has been minimized.

@dwickern

dwickern Jun 19, 2017

Author Contributor

Sounds good. I won't bother with a warning or deprecation message since sourceMaps was never valid inside ember-cli-babel to begin with

This comment has been minimized.

@rwjblue

rwjblue Jun 19, 2017

Member

Perfect!

@dwickern dwickern force-pushed the dwickern:sourcemaps branch from 267f4ec to 8119645 Jun 19, 2017

@rwjblue rwjblue merged commit 3f9f223 into babel:master Jun 25, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dwickern dwickern deleted the dwickern:sourcemaps branch Jun 25, 2017

@thefonso

This comment has been minimized.

Copy link

thefonso commented Jul 1, 2017

can someone point me to instructions on how to use this?

@dwickern

This comment has been minimized.

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