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

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

Merged
pi0 merged 6 commits intomainfrom
fix/watch-more-things
Jun 10, 2022
Merged

fix(nuxt): don't debounce watcher, and include layers#5002
pi0 merged 6 commits intomainfrom
fix/watch-more-things

Conversation

@danielroe
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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.

Comment thread packages/nuxt/src/core/builder.ts Outdated
Comment thread packages/nuxt/src/core/builder.ts Outdated
@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