Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

use babel-preset-react-hmre #83

Merged
merged 2 commits into from Dec 24, 2015
Merged

use babel-preset-react-hmre #83

merged 2 commits into from Dec 24, 2015

Conversation

ghost
Copy link

@ghost ghost commented Dec 22, 2015

@jamiebuilds
Copy link
Collaborator

Doesn't this just get in the way of having a more diverse ecosystem of react transforms? By limiting it to just the two by @gaearon that means you're preventing people from adding more to the configuration.

I leaning towards no on this one.

@ghost
Copy link
Author

ghost commented Dec 22, 2015

As far as I can tell, there wouldn't be issues with including additional presets. It is possible that I'm overlooking something.

In this demo, I split the error catching(redbox) and HMR into different presets and things still seem to work as expected.
split react presets

@gaearon
Copy link
Owner

gaearon commented Dec 22, 2015

I think having a preset is beneficial because 95% users want just these two and are intimidated by configuration.

@ghost
Copy link
Author

ghost commented Dec 23, 2015

Just want to clarify that I wasn't suggesting breaking the preset included here down into two different presets, just that using this preset wouldn't preclude the use of other react-transform plugin presets so the ecosystem shouldn't be harmed at all.

Like gaearon mentioned, the configuration ( react-transform, not necessarily babel config ) is intimidating to new users. It is yet another bump in the road for adopters of this (react, redux, hmr, etc) ecosystem and this type of preset is just a way to smooth out that bump. As soon as users want more power, they can dive in and figure out how to add other transforms or extend this one very easily.

gaearon added a commit that referenced this pull request Dec 24, 2015
@gaearon gaearon merged commit 972f9d1 into gaearon:master Dec 24, 2015
@gaearon
Copy link
Owner

gaearon commented Dec 24, 2015

Yeah I'm for this. Advanced users will figure out how to customize it.

cookpete added a commit to cookpete/react-transform-boilerplate that referenced this pull request Jan 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants