Skip to content

Fix watch path to avoid node_modules #1271

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

Merged
merged 1 commit into from
Apr 30, 2025
Merged

Fix watch path to avoid node_modules #1271

merged 1 commit into from
Apr 30, 2025

Conversation

colinrotherham
Copy link
Contributor

Description

This PR prevents gulp watch responding to node_modules changes

It was caused by npm workspace support in #1261 which makes node_modules/nhsuk-frontend a symlink

Console output

Example console output when **/*.njk changes matched both:

'packages/components/**/*.njk' # source path
'node_modules/nhsuk-frontend/packages/components/**/*.njk' # symlink path
[Browsersync] Serving files from: dist/app
[09:42:48] Finished 'serve' after 123 ms
[09:42:48] Finished 'docs:serve' after 124 ms
[09:42:48] Finished 'default' after 126 ms
[09:43:15] Starting 'buildHTML'...
[09:43:15] Finished 'buildHTML' after 364 ms
[09:43:16] Starting 'buildHTML'...
[09:43:16] Finished 'buildHTML' after 246 ms
[09:43:16] Starting 'buildHTML'...
[09:43:16] Finished 'buildHTML' after 158 ms
[09:43:17] Starting 'buildHTML'...
[09:43:17] Finished 'buildHTML' after 173 ms
[09:43:17] Starting 'buildHTML'...
[09:43:17] Finished 'buildHTML' after 169 ms
[09:43:17] Starting 'buildHTML'...
[09:43:18] Finished 'buildHTML' after 167 ms
[09:43:18] Starting 'buildHTML'...
[09:43:18] Finished 'buildHTML' after 153 ms
[09:43:18] Starting 'buildHTML'...
[09:43:18] Finished 'buildHTML' after 155 ms
[09:43:19] Starting 'buildHTML'...
[09:43:19] Finished 'buildHTML' after 156 ms
[09:43:19] Starting 'buildHTML'...
[09:43:19] Finished 'buildHTML' after 149 ms
[09:43:20] Starting 'buildHTML'...
[09:43:20] Finished 'buildHTML' after 179 ms

Checklist

Copy link

@colinrotherham colinrotherham merged commit 25698cf into main Apr 30, 2025
13 checks passed
@colinrotherham colinrotherham deleted the fix-reload-loop branch April 30, 2025 08:59
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 this pull request may close these issues.

2 participants