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

[Bug]:An infinity loop in HMR occurs when saving the Unocss code #654

Closed
sixdjango opened this issue Nov 23, 2023 · 6 comments · Fixed by #674
Closed

[Bug]:An infinity loop in HMR occurs when saving the Unocss code #654

sixdjango opened this issue Nov 23, 2023 · 6 comments · Fixed by #674
Assignees
Labels
🐞 bug Something isn't working

Comments

@sixdjango
Copy link

sixdjango commented Nov 23, 2023

Version

Macos:14.1.1 (23B81)
Chrome: 119.0.6045.159
Npm: 9.6.7
Rsbuild: 0.1.0

Details

An infinity loop in HMR occurs when saving the Unocss code
image

Reproduce link

https://github.com/sixdjango/rsbuild-unocss

Reproduce Steps

change Unocss code as needed, then save it.

@sixdjango sixdjango added the 🐞 bug Something isn't working label Nov 23, 2023
@chenjiahan
Copy link
Member

@9aoy please help to check this issue

@sixdjango sixdjango changed the title [Bug]:An infinity loop in HRM occurs when saving the Unocss code [Bug]:An infinity loop in HMR occurs when saving the Unocss code Nov 23, 2023
@9aoy
Copy link
Collaborator

9aoy commented Nov 23, 2023

Rsbuild outputs dist files to disk, so when fileSystem **/* is set, it contains the dist file and always finds it updated 😂
image

@chenjiahan
Copy link
Member

This can be better:

export default defineConfig({
  content: {
    filesystem: [
      'src/**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}',
    ]
  },
})

@chenjiahan
Copy link
Member

Watch less files is good for the performance, just like Tailwind CSS:

image

@sixdjango
Copy link
Author

sorry, this's my fault. But think you!🫡

@chenjiahan
Copy link
Member

We can provide a guide for UnoCSS @9aoy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants