Purpose of this preprocessor? #13
Description
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?