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(lib): only resolve css bundle name if have styles #18530

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 31, 2024

Description

Fix regression caused in unocss: https://github.com/vitejs/vite-ecosystem-ci/actions/runs/11605301143/job/32315459604#step:8:2297

If bundling in library mode without any css, or using cssCodeSplit: true, they'll be no bundled CSS file.

This PR refactors so that the css bundle name is only calculated if the code found there's CSS.

@bluwy bluwy added p3-minor-bug An edge case that only affects very specific usage (priority) feat: library mode labels Oct 31, 2024
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

This makes sense 👍

@bluwy bluwy merged commit 5d6dc49 into main Oct 31, 2024
17 checks passed
@bluwy bluwy deleted the lib-styles-lazy branch October 31, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: library mode 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.

2 participants