Skip to content

Conversation

@sapphi-red
Copy link
Member

Description

unocss passes {} as the pluginContext and this.getModuleInfo is undefined in that case.
https://github.com/unocss/unocss/blob/355558bd779997f61aab798b2a1912426064b216/packages-integrations/vite/src/modes/global/build.ts#L183-L187
#19418 added a this.getModuleInfo call and broke unocss.
This is technically a bug in unocss, but since the patch on our side is small and can avoid breakage on their side, I think we can add this ?. for now. Let's remove it in Vite 7.

See https://discord.com/channels/804011606160703521/1342361424370077818/1342395667598938202

@sapphi-red sapphi-red added feat: css p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) labels Feb 21, 2025
@sapphi-red
Copy link
Member Author

/ecosystem-ci run

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 21, 2025

Open in Stackblitz

npm i https://pkg.pr.new/vite@19478

commit: 1d5adf7

@vite-ecosystem-ci

This comment was marked as outdated.

@vite-ecosystem-ci
Copy link

@sapphi-red sapphi-red merged commit 12b0b8a into vitejs:main Feb 21, 2025
19 checks passed
@sapphi-red sapphi-red deleted the fix/temporary-check-this-get-module-info-existence branch February 21, 2025 10:10
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: css p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) trigger: preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants