-
-
Notifications
You must be signed in to change notification settings - Fork 966
Closed
Description
UnoCSS version
v66.1.0-beta.11
Describe the bug
With vite version 6.3 the dist-chunk mode no longer works. Vite build gives the following error message:
> vite build
vite v6.3.0 building for production...
✓ 576 modules transformed.
[unocss] writing css to main-!~{004}~.js.css { handler: [AsyncFunction: handler] }
✗ Build failed in 947ms
error during build:
[unocss:chunk] cssPlugin.transform is not a function...
This seems to be happening due to the api change from this commit introduced in vite 6.3:
vitejs/vite#19586
I am not sure if anything is affected by this. For the dist-chunk mode I guess the only change needed, is to call the transform hook in the chunk-build.ts like this
await cssPlugin!.transform.handler(css, fakeCssId)
Reproduction
Use dist-chunk mode and try to build with vite version 6.3
System Info
No response
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels