-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
webpacker react -- prop-types, @babel/preset-react listed as dependencies? #1610
Comments
I'm confident that these were included on purpose. the babel preset is needed so that the jsx can be parsed during precompilation
|
I know what they do, just wondering why they are dependencies and not devDependencies. Also if you're using flow or Typescript you won't be using |
Ah I misunderstood the question I'm certainly not the authority, but think the idea was that they are both fairly safe, standard defaults. In terms of babel, I believe that including the plugin as dependency vs devDependency was probably done so that precompilation runs in a In terms of However, it seems like the thinking has evolved preference towards using it as a devDependency only and then using something like babel-plugin-transform-react-remove-prop-types to remove the import statements. This thread is pretty straightforward discussion: facebook/create-react-app#209 which eventually leads to facebook/create-react-app#3818 and prop-types being stripped in production as a default in create-react-app |
Is this still an issue? Closing for now but feel free to reopen if needed |
Here.
I was wondering, is there something about Webpacker that means these are needed as dependencies? Or is this an oversight? Thanks!
The text was updated successfully, but these errors were encountered: