Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing empty array for the ignored option causes webpack to ignore all files #239

Closed
dextersealy opened this issue Aug 12, 2024 · 0 comments · Fixed by #240
Closed

Passing empty array for the ignored option causes webpack to ignore all files #239

dextersealy opened this issue Aug 12, 2024 · 0 comments · Fixed by #240

Comments

@dextersealy
Copy link

If an empty array is passed to watchOptions.ignored then webpack ignores all files.

I believe the problem is this code that converts the ignored array into a function:

	if (Array.isArray(ignored)) {
		const regexp = new RegExp(ignored.map(i => stringToRegexp(i)).join("|"));
		return x => regexp.test(x.replace(/\\/g, "/"));

When ignored is an empty array, it returns a RegExp that matches all strings.

@dextersealy dextersealy changed the title Passing empty array for the **ignored** option causes webpack to ignore all files Passing empty array for the ignored option causes webpack to ignore all files Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant