-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
feat: use local babel config if it exists #320
Conversation
Would you consider this is a non breaking change? I wonder if I should create new branch for 4.x and merge that in there or if it is fine to be in the next release as new feature. I can see that it might break for people that have their config not setup correctly and suddenly certain parser plugins are not active anymore. But I do not think this should be a common case. |
yeah, I mean i'd say its technically probably a breaking change, but pretty unlikely to actually break anyone. I'd be tempted to say that any breakage would be positive too since it's likely surfacing a misconfiguration somewhere. |
👍 |
🎉 |
it occurs to me that we should still add an ability to manually pass through parser options for tool chains that don't depend on a babelrc on disk, like gatsby, which will do something similar to to this, defaulting basic options if there is no local config. It'd be nice if react-docgen could still work using those settings |
Yeah, we could create a a I'm not sure what babel would do internally, but I think it will merge config files with the supplied options where as programmatic options take precedence. |
After thinking more about it, I think I would do the next version with this PR as 4.0. I ran into breaking changes myself while building the website (https://reactcommunity.org/react-docgen/). I started creating it before this PR and then merged it afterwards which broke the webpack build because Anyway I guess it is not a big deal to do a major version and then we are on the safe side even though for most users it shouldn't be a breaking change. |
All good with me 👍 integers are cheap |
No description provided.