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

Enzyme compatibility in Webpack config #180

Closed
insin opened this issue Jul 25, 2016 · 4 comments
Closed

Enzyme compatibility in Webpack config #180

insin opened this issue Jul 25, 2016 · 4 comments

Comments

@insin
Copy link
Contributor

insin commented Jul 25, 2016

RE: #80 (comment)

This is what's required for Enzyme compatibility:

https://github.com/airbnb/enzyme/blob/master/docs/guides/webpack.md#react-15-compatability

externals: {
  'react/addons': true,
  'react/lib/ExecutionEnvironment': true,
  'react/lib/ReactContext': true
}

This project doesn't have a test-specific Webpack config, so where should this go?

@gaearon
Copy link
Contributor

gaearon commented Jul 25, 2016

OK, happy to take a PR adding this.

@gaearon gaearon added this to the 0.2.0 milestone Jul 26, 2016
@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2016

I’ve looked at it again and I don’t quite see the point. Presumably you’d run Enzyme outside of both npm start and npm run build anyway, wouldn’t you? And in this case you’d likely want a custom config anyway that’s tailored to tests.

What is the reasoning behind including these externals either in current dev or prod config?

cc @ariporad

@gaearon gaearon removed this from the 0.2.0 milestone Jul 27, 2016
@mxstbr
Copy link
Contributor

mxstbr commented Jul 27, 2016

What is the reasoning behind including these externals either in current dev or prod config?

Nothing, those should go in the testing specific webpack config if we had one as reflected in @insin's question at the end of the issue. 👍

@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2016

Okay, I’ll close then until we decide something on testing.

@gaearon gaearon closed this as completed Jul 27, 2016
@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants