Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Purpose of this preprocessor? #13

Closed
@dkreft

Description

@dkreft

I'm trying to get Cypress integrated into an existing project and I've wired up this preprocessor up and I'm not sure what it is that it is doing or why I should use it.

I was thinking that maybe, since it allows me to pass in my existing webpack config, that it would launch the development server and all that for me, but alas it doesn't. Then I was thinking that maybe it had something to do with restarting the tests when a file is modified, but that doesn't appear to be the case either--the webpack development server does its own reload of the page inside Cypress but does not cause the tests to re-run.

What am I missing?

Here's my plugins/index.js:

require('babel-register')

const WebpackPreprocessor = require('@cypress/webpack-preprocessor')
const WebpackConfig = require('../../webpack.config.babel')

module.exports = (on, config) => {
  on('file:preprocessor', WebpackPreprocessor({
    webpackOptions: WebpackConfig,
  }))
}

I'm not sure that posting my entire webpack.config would be useful here.

Finally, is there any way to get Cypress to work in conjunction with my existing webpack development server configuration?

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