cypress-documentation
cypress-documentation copied to clipboard
Add documentation to explain how to ignore certain files in the preprocessor API
Related issue: https://github.com/cypress-io/cypress/issues/3098
@Bkucera said: Hi @silbinarywolf , you should be able to use the Preprocessor API to modify how cypress watches files and reloads Does this help?
I replied with:
@Bkucera If documentation can be added here alongside watchForFileChanges here that explains how to ignore certain files via the preprocessor API, that'd be good. The issue was more that it wasn't immediately obvious how I can just force Cypress to ignore a certain file from being ~~changed~~ watched / triggering a Webpack build.
I was looking for something to exclude files being watched in the configuration section of the documentation.
EDIT: I edited my copy-pasted reply a bit for clarity.
I'm trying to figure this out myself. In on('file:preprocessor', (file) => {/*stuff*/});, there's a file.shouldWatch property, but there doesn't seem to be a way to change that and hook into the default preprocessor without manually calling the preprocessor.
@FFdhorkin
If you don't get an answer here, you could ask the Cypress technical community on Discord
I'm trying to figure this out myself. In
on('file:preprocessor', (file) => {/*stuff*/});, there's afile.shouldWatchproperty, but there doesn't seem to be a way to change that and hook into the default preprocessor without manually calling the preprocessor.
@FFdhorkin did you ever work this out?