Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): don't debounce watcher, and include layers #5002

Merged
merged 6 commits into from
Jun 10, 2022
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented May 16, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#13791, resolves nuxt/nuxt#14053

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In some circumstances the watcher was swallowing 'add' events, causing nuxt/nuxt#13791 (not just on Windows), because it was debouncing an add + change event into a single change event. This PR removes the debouncing on the watcher, as we already have a debouncer on the generateApp function. (But alternative suggestions welcome.)

This PR also adds layers to the watch sources, and slightly tightens what paths trigger a regeneration of the app. Layers will be excluded automatically if they are in node_modules, of course, so the effect is only to include base layers within a monorepo.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels May 16, 2022
@danielroe danielroe requested a review from pi0 May 16, 2022 12:02
@danielroe danielroe self-assigned this May 16, 2022
@netlify
Copy link

netlify bot commented May 16, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 1a8f974
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62a35346cc8c93000845825e

Copy link
Member

@atinux atinux left a comment

Choose a reason for hiding this comment

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

Looking good! It is also a great DX improvement for theme authors.

packages/nuxt/src/core/builder.ts Outdated Show resolved Hide resolved
packages/nuxt/src/core/builder.ts Outdated Show resolved Hide resolved
@danielroe danielroe requested a review from pi0 June 2, 2022 06:53
@pi0 pi0 mentioned this pull request Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
3 participants