Is this the correct way to employ your plugin with webpack?
const cucumber = require( 'cypress-cucumber-preprocessor' ).default;
const webpack = require( '@cypress/webpack-preprocessor' );
module.exports = ( on /* config */ ) => {
on( 'file:preprocessor', webpack());
on( 'file:preprocessor', cucumber());
};
@leegee not sure, as I've never used it with webpack. Do you get an error? Could you give us more information? :)
A repository with a reproduction would be fantastic
You can use
on('file:preprocessor', (file) => {
if (file.filePath.match(/\.(js|jsx)/g)) {
return webpack(options)(file)
} else {
return cucumber()(file)
}
})
Thanks!
Very cool, thanks for helping @lobor :-)
Most helpful comment
You can use