I haven't found any information in the docs about support for multiple preprocessors.
I've used the webpack preprocessor in some projects, and the cucumber proprocessor i others. For my new project, I'd like to use them both.
I tried adding two `on('file:preprocessor') like this:
on('file:preprocessor', cucumber())
on('file:preprocessor', wp({
webpackOptions: require('../../webpack.config'),
}))
but then it doesn't preprocess the .feature files.
Any advice?
Nevermind, I managed to solve it.
This works:
on('file:preprocessor', file => {
return file.filePath.includes('.feature')
? cucumber()(file)
: wp({
webpackOptions: webpackConfig,
})(file)
})
Actually, I do need to support more than one preprocessor at the same time. Is it possible?
Wondering the same thing as @Maximus1285
Most helpful comment
Nevermind, I managed to solve it.
This works: