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

exclude /node_modules/ from _watch by default #1794

Merged
merged 4 commits into from Apr 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/Server.js
Expand Up @@ -115,7 +115,14 @@ class Server {

this.sockets = [];

this.watchOptions = options.watchOptions || {};
if (!options.watchOptions) {
options.watchOptions = {};
}
// ignoring node_modules folder by default
options.watchOptions.ignored =
options.watchOptions.ignored || /node_modules/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need use here [/node_modules/]. also need add tests to avoid future regressions

this.watchOptions = options.watchOptions;

this.contentBaseWatchers = [];
// Replace leading and trailing slashes to normalize path
this.sockPath = `/${
Expand Down