What problem does this feature solve?
As a framework developer, I would like to add some extra watchOptions.ignored configuration. If the original watchOptions.ignored is a RegExp, I cannot make the user configuration and my configuration work at the same time, because rspack does not support the (string | RegExp)[] type
https://rspack.rs/config/watch#watchoptionsignored
User's configuration:
export default {
//...
watchOptions: {
ignored: /\.git/,
},
};
After merged configuration:
export default {
//...
watchOptions: {
ignored: [/\.git/, '**/dist'],
},
};
What does the proposed API of configuration look like?
watchOptions.ignored support (string | RegExp)[] type.
- type ignored = RegExp | string | string[];
+ type ignored = RegExp | string | (string | RegExp)[];
What problem does this feature solve?
As a framework developer, I would like to add some extra
watchOptions.ignoredconfiguration. If the originalwatchOptions.ignoredis a RegExp, I cannot make the user configuration and my configuration work at the same time, because rspack does not support the(string | RegExp)[]typehttps://rspack.rs/config/watch#watchoptionsignored
User's configuration:
After merged configuration:
What does the proposed API of configuration look like?
watchOptions.ignoredsupport(string | RegExp)[]type.