-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: skip fields not supported by rolldown for rolldown-vite #4747
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: skip fields not supported by rolldown for rolldown-vite #4747
Conversation
// important so that each page chunk and the index export things for each | ||
// other | ||
preserveEntrySignatures: 'allow-extension', | ||
// @ts-ignore skip setting it for rolldown-vite since it doesn't support `preserveEntrySignatures` yet | ||
...(vite.rolldownVersion | ||
? undefined | ||
: // important so that each page chunk and the index export things for each | ||
// other | ||
{ preserveEntrySignatures: 'allow-extension' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part can be reverted once rolldown/rolldown#3500 lands.
One issue is still there: Line 59 in ab0e0cb
Lines 319 to 335 in ab0e0cb
If I remove that chunk.type condition it works fine. Is this expected? const isPageChunk = (
chunk: Rollup.OutputAsset | Rollup.OutputChunk | Rollup.RenderedChunk
): chunk is Rollup.OutputChunk | Rollup.RenderedChunk =>
!!(
(!('type' in chunk) || chunk.type === 'chunk') &&
chunk.isEntry &&
chunk.facadeModuleId &&
chunk.facadeModuleId.endsWith('.md')
) The older types had: Looks like now it doesn't have type set? |
@brc-dd Ah, that is a bug. I've made a fix at rolldown/rolldown#4553 |
<!-- Thank you for contributing! --> ### Description This PR adds the missing `type` property to `RenderedChunk` that exists in rollup. https://github.com/rollup/rollup/blob/7536ffb3149ad4aa7cda4e7ef343e5376e2392e1/src/rollup/types.d.ts#L933 reported at vuejs/vitepress#4747 (comment) <!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
Merged it for now. I believe the rolldown fix will be pulled automatically once rolldown-vite updates to it. Anyway it's not breaking anything major and the sites work fine even with the current rolldown-vite version. |
Description
Skip fields that are not supported by rolldown when it's running with rolldown-vite.
This PR will make ecosystem-ci pass with rolldown-vite.
Linked Issues
Additional Context
Tip
The author of this PR can publish a preview release by commenting
/publish
below.