Skip to content

Webpack 5 support #6

@raw3

Description

@raw3

Hey there!

I've been struggling a fair bit to get our stack working after some library upgrades. Basically the issue comes down to two separate issues (which I hope is simply us making a simple configuration mistake):


  1. We run the same Webpack version for Cypress in-line with our Angular version. Since we upgraded to Angular 12 which uses Webpack 5 in the background, it has stopped working with this cypress-cucumber-webpack-typescript-example configuration giving the error:
Error: Webpack Compilation Error
Cannot read property 'fallback' of undefined

We did follow some suggestions dictated in the main Cypress thread for Webpack 5 support. It works when having normal .spec files, but fails the moment we introduce cypress-cucumber-webpack and work with .feature files.

  1. We can circumvent Webpack using @cypress/browserify-preprocessor and then the tests run, but our tsconfig path aliases were not working properly once we did. We did not manage to get them working using custom babelrc settings so far, which is why we wanted to stick with Webpack (aside from the point we use Webpack more across our stack).

I have a minimal repo here (with a nice auto-generated repo-name 🌝) with the issues and a basic example of how we run our stack.

https://github.com/raw3/psychic-guacamole

It would be great if we could get it working, since we really love working with .feature files and love the work you guys are doing! If there's any info missing or if there's anything I can do to help, feel free to let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions