-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add enzyme/webpack entrypoint with getPluginsForInstalledReact function #895
Conversation
@@ -0,0 +1,33 @@ | |||
// eslint-disable-next-line import/no-extraneous-dependencies | |||
import { IgnorePlugin } from 'webpack'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this means we have yet another implicit dependency :-/
Theoretically it's a safe one, if someone's importing the "webpack" entry point they're likely to have webpack available, but there's no way to declare version compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know :(
Another concern is that we'd be introducing a new API that we must remove once we release the rewrite with adapters...
import { REACT013, REACT155 } from './version'; | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export function getPluginsForInstalledReact() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any future plans for any other exports from this entry point, such that this shouldn't be the default export?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really, i made it a named export to make the name of the function clarify what it does
6a63cdd
to
8550011
Compare
@aweary @blainekasten @lelandrichardson id like to have one more opinion before merging this, if any of you guys have time to take a look it'd be great :) |
8550011
to
97a63d9
Compare
- export getPluginsForInstalledReact function - update our karma config to use it - update documentation guides to use it
97a63d9
to
926c2c2
Compare
should I close this now @ljharb ? |
We'll probably still want to incorporate it once #1007 lands. |
but after #1007 we will have no need for custom webpack configs i hope, no? |
ah that's true :-) Yeah, let's close this, but make sure to revisit just in case after the next major. |
Motivation
Changes
getPluginsForInstalledReact
is currently tested with webpack 1 and all supported versions of react because it is used in our karma testscloses #881 #740 #744 #847 #309 #791