-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Describe the bug
After vp migrate, projects that use object-form manualChunks in their Vite config fail to build because Rolldown does not support the object form.
Warning: Invalid output options (1 issue found)
- For the "manualChunks". Invalid type: Expected Function but received Object.
TypeError: manualChunks is not a function
vp migrate should convert object-form manualChunks to function form, or at minimum warn about this incompatibility.
Before (works with Rollup, fails with Rolldown)
manualChunks: {
'react': ['react', 'react-dom'],
}After (works with Rolldown)
manualChunks(id) {
if (id.includes('node_modules/react/') || id.includes('node_modules/react-dom/')) {
return 'react';
}
}Reproduction
- Have a Vite project with object-form
manualChunksinvite.config.js - Run
vp migrate - Run
vp build
System Info
vp v0.1.11
Local vite-plus:
vite-plus v0.1.11
Tools:
vite v8.0.0
rolldown v1.0.0-rc.9
vitest v4.1.0
oxfmt v0.40.0
oxlint v1.55.0
oxlint-tsgolint v0.16.0
tsdown v0.21.2
Environment:
Version 24.14.0
Source lts
Logs
Warning: Invalid output options (1 issue found)
- For the "manualChunks". Invalid type: Expected Function but received Object.
TypeError: manualChunks is not a function
at name (file:///path/to/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/rolldown-build-CYoDea9V.mjs:3102:10)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackPriority
None yet
Effort
None yet