-
-
Notifications
You must be signed in to change notification settings - Fork 148
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 webpack loader #115
Add webpack loader #115
Conversation
Wow! This is fantastic. The thing I'm not sure about though - do we still get the watch functionality when using webpack like this? Currently I believe we watch both step definition .js and .feature files. Watching only the .feature file would make this much less developer friendly experience. :( I mean - this is not a regression since we currently don't even support this mode.. but I wonder if there is something we can do here. ...I missed the "thank you" part ;-) so - editing to say THANK YOU :) |
webpack handles watch by itself: it will watch anything that was required/imported by any of the files (even |
@lgandecki do you have any other questions or concerns about this PR? Would like to get this merged :) |
Hey @mkusher I need to test this out, especially since there are no tests (I guess this is a tricky thing to build a test for, unless we do another cypress configuration that uses webpack and do two test runs, which would be a bit cumbersome and slow..) and since you there is no documentation in the PR that's also on my plate. :-) my plan is to get this done over this weekend. |
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
With what version of webpack is that supposed to work? if I use the example configuration above, with only the cypress cucumber preprocessor rule, then my feature files never get loaded (I get a webpack compilation error). If I use that preprocessor directly in the plugin/index.js as in the workaround solution to this problem (see #114), the feature files are loaded. Any hint on what I am missing here? |
It's not supposed to work but it works :) please make a reproduction or at least show us your webpack config (make sure that's the Thanks |
I can be a bit more precise: here's my webpack config:
Here's my
I get the following errors:
|
If I write the following code in my
then I get the following errors:
In particular I was able to see this:
Here's my
|
if you remove loader does the problem goes away? I haven't found |
You mean if I comment this out?
from my
|
Just to add more precision. My feature tests totally work if I do this:
If I, however, define this, then I get the errors mentionned before:
and
|
what if you comment |
Same problem. It seems to be an issue of the |
so, the problem is not with |
I don't think the
And I am using the very same |
since the problem is not with this package and this loader, the better place to ask is https://github.com/cypress-io/cypress-webpack-preprocessor |
Solution for #114
The only thing that needed is to move
compile
function fromindex.js
to a separate module.Example configuration
Sample
webpack.config.js
may look like this:and
plugins/index.js
need just to include webpack: