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

fix(hmr): don't consider CSS dep as a circular dep #15229

Conversation

sapphi-red
Copy link
Member

Description

In future, maybe we should add cssImporters field to ModuleNode type which will resolve these tailwind related issues together including #9512. But that will be a big change, so instead I made a small change that would fix the case that was working in past.

fixes #15221
refs #14867
refs 6eaec3a

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority) labels Dec 3, 2023
Copy link

stackblitz bot commented Dec 3, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ArnaudBarre
Copy link
Member

The real long term solutions is Tailwind moving out of PostCSS and integrating with bundlers like unoccs does, so I'm fine with this change

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Thanks for handling this

@patak-dev patak-dev merged commit 5f2cdec into vitejs:main Dec 4, 2023
10 checks passed
@sapphi-red sapphi-red deleted the fix/hmr-do-not-consider-css-dep-as-circular-dep branch December 4, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vite:hmr circular imports detected: /src/index.css -> /src/main.jsx -> /src/index.css
4 participants