Skip to content
New issue

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

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

Already on GitHub? # to your account

Watch Mode Fails to Detect Style Changes in v0.52.0+ (chokidar glob support removed) #3144

Open
2 of 3 tasks
vickzeinkiv opened this issue Feb 18, 2025 · 0 comments
Open
2 of 3 tasks

Comments

@vickzeinkiv
Copy link

vickzeinkiv commented Feb 18, 2025

Description

After upgrading from version 0.41.0 (and versions up to 0.51.0) to 0.53.0 on Windows 11(and MacOS), I noticed that watch mode no longer detects changes in style files. It still picks up changes to configuration files. This issue appears to have started with version 0.52.0.

Link to Reproduction

https://stackblitz.com/edit/vitejs-vite-qor1hktw?view=editor

Steps to reproduce

  1. Configure pandacss with an include pattern such as:
include: [
  './src/**/*.{ts,tsx}',
]
  1. Run watch mode.
  2. Modify a style file in the ./src/ directory.
  3. Notice that the change is not detected, whereas changes to configuration files are.

JS Framework

React (TS)

Panda CSS Version

0.52.0

Browser

any

Operating System

  • Windows
  • macOS
  • Linux

Additional Information

Expected Behavior:
Watch mode should detect changes in all tracked files, including style files.

Additional Context:
It seems that the issue is related to the update of chokidar to version 4 in v0.52.0. According to the chokidar migration guide, glob patterns are no longer supported in the same way. In panda, the include configuration is passed directly to chokidar.watch (source code reference), which likely explains why glob patterns like ./src/**/*.{ts,tsx} no longer work as expected.

For reference, here’s an article on handling the changes in chokidar v4:
Migration: From chokidar 3.x to 4.x

Possible Solutions:
It might be necessary to adjust the way file patterns are passed to chokidar in panda or provide documentation/guidance for the new pattern requirements. Any assistance in resolving this would be greatly appreciated!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant