Skip to content
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

Set babelrc option to true by default #581

Closed
wants to merge 2 commits into from
Closed

Conversation

al-the-x
Copy link

@al-the-x al-the-x commented Feb 25, 2018

Please Read the CONTRIBUTING Guidelines
In particular the portion on Commit Message Formatting

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix (.babelrc not working #552)
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

As reported in #552, babel-loader does not respect .babelrc, .babelrc.js or the babel property of package.json like babel does normally.

What is the new behavior?

Defaulting the babelrc option to true signals babel-loader to scan for .babelrc et al as expected.

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the following...

  • Impact:
  • Migration path for existing applications:
  • Github Issue(s) this is regarding:

Other information:

So that `babel-loader` uses `.babelrc` et al if available. Nothing horrible will happen if no such file exists.
Because ternaries with `&&`-ed predicates are hard to format well and read.
@al-the-x
Copy link
Author

I'm really not sure why leaving babelrc in the original code doesn't trigger the predicate above, but I haven't traced the logic yet, either. If someone wants to point me at the right test file (options.test.js...?) and strategy for testing the existence of a .babelrc file, I'm happy to add test to this effect.

@danez
Copy link
Member

danez commented Feb 25, 2018

#583 contains a fix for the issue and will be released in the next beta.

@danez danez closed this Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants