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

Fix error when no "targets" options in .babelrc #886

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

starkwang
Copy link

When .babelrc has no "targets" option in env, like:

{
  "presets": ["env"]
}

Then it will cause an error:

Cannot read property 'targets' of undefined
    at loadBabelrc (/node_modules/parcel-bundler/src/utils/getTargetEngines.js:113:23)
    at <anonymous>

This PR is to fix it.

@codecov-io
Copy link

Codecov Report

Merging #886 into master will decrease coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #886      +/-   ##
==========================================
- Coverage   88.92%   88.77%   -0.15%     
==========================================
  Files          68       68              
  Lines        3440     3440              
==========================================
- Hits         3059     3054       -5     
- Misses        381      386       +5
Impacted Files Coverage Δ
src/utils/getTargetEngines.js 96.62% <100%> (ø) ⬆️
src/assets/CSSAsset.js 81.73% <0%> (-4.35%) ⬇️
src/assets/StylusAsset.js 82.27% <0%> (-1.27%) ⬇️
src/visitors/dependencies.js 83.11% <0%> (+1.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32c38e5...3d51284. Read the comment docs.

@devongovett devongovett merged commit 69f7c6d into parcel-bundler:master Feb 24, 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.

None yet

4 participants