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: prevent babel reading babel.config.js #206

Merged
merged 1 commit into from Oct 13, 2018

Conversation

xwchris
Copy link
Contributor

@xwchris xwchris commented Oct 9, 2018

Summary

When use @svgr/webpack as loader in webpack and has a babel.config.js in project at the same time, svgr will read babel.config.js which will be merged to it's own config. This may causes some problems. For exmaple when I use react-hot-loader in babel.config.js, svgr throw an error

TypeError: Property value expected type of string but got null

Of course, if I change my own babel.config.js to .babelrc, then I can solve the problem because of babelrc: false

So, like babelrc: false, configFile: false prevent babel reading babel.config.js.

Test plan

This is my babel.config.js
image

when use @svgr/webpack to deal svg here is the output
image

but after add configFile: false the output is success
image

@vercel
Copy link

vercel bot commented Oct 9, 2018

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@codecov
Copy link

codecov bot commented Oct 9, 2018

Codecov Report

Merging #206 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #206   +/-   ##
=======================================
  Coverage   85.57%   85.57%           
=======================================
  Files          24       24           
  Lines         520      520           
  Branches      103      103           
=======================================
  Hits          445      445           
  Misses         67       67           
  Partials        8        8
Impacted Files Coverage Δ
packages/webpack/src/index.js 95.45% <ø> (ø) ⬆️

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 62c7815...0cb91dc. Read the comment docs.

@gregberge
Copy link
Owner

Thanks for this fix!

@gregberge gregberge merged commit 514d43d into gregberge:master Oct 13, 2018
@stevemao
Copy link

@neoziro could you make a new release, please?

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

3 participants