-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support for Webpack? #62
Comments
I see that rewire runs on Node but also supports webpack so may be that is a reasonable option? (Though I prefer proxyquire's API) |
Have a look at proxyqurieify and proxyquire-universal. FWIW all this is explained in the second paragraph of the README |
No plans to support Webpack specifically since neither of us use it. If someone really wanted to invest the time I'd be willing to help offer guidance. Otherwise it's just not very high on my list. I'd really recommend not using rewire. Using eval to write unit tests is a really bad idea in principle, but it can also create a ton of compatibility headaches as well. Most transpilers (e.g. Babel) can change your variable names and then everything breaks. |
Thank you. I have looked briefly at the code of proxyqurieify, proxyquire-universal, and rewire-webpack and it seems to be no simple matter to port proxyquire to a new build tool so I guess I will need to use rewire :-( |
Actually this is a good reason to switch to browserify. |
Just noticed a new Babel plugin inspired by rewire. Thought it might be of interest: https://github.com/speedskater/babel-plugin-rewire |
I'm coming here after trying the babel-plugin-rewire plugin. It doesn't support function imports. I had high hopes for this library, but I can't use it without Webpack support. |
This may be useful for Webpack users looking for proxyquire-like functionality: https://github.com/plasticine/inject-loader |
Hello,
Thanks for this great library! I wonder whether there are any plans to support also Webpack in addition to Browserify. How large job is it to add support for it?
Thank you!
The text was updated successfully, but these errors were encountered: