Open silbinarywolf opened 5 years ago
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.
I'm trying to figure this out myself. In
on('file:preprocessor', (file) => {/*stuff*/});
, there's afile.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 did you ever work this out?
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 beingchangedwatched / 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.