fix(cli): avoid circular chunk warning between monaco types and shiki#2467
Open
mjvo wants to merge 5 commits into
Open
fix(cli): avoid circular chunk warning between monaco types and shiki#2467mjvo wants to merge 5 commits into
mjvo wants to merge 5 commits into
Conversation
✅ Deploy Preview for slidev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@slidev/client
create-slidev
create-slidev-theme
@slidev/parser
@slidev/cli
@slidev/types
commit: |
Member
|
I think the reason we use manual chunking is that we want to pack the related code into a single chunk for better output structure and client load efficiency. In terms of the circular references, I think we should figure out why and where the shared chunk is to perform better manual chunking. Removing it basically loses the original point of doing manual chunking, as both Monaco and Shiki generate too many chunks, which is suboptimal. Other than improving the manual chunking, I think we may also add an option to disable manual chunking logic entirely if people prefer automatic chunking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes hard manual chunk assignment for Monaco types and Shiki in
packages/slidev/node/vite/extendConfig.ts.Why:
Circular chunk: monaco/bundled-types -> modules/shiki -> monaco/bundled-typesWhat changed:
manualChunksnow returnsundefined(let Rollup decide chunk placement)
Validation:
before: circular chunk warning appears
after: warning no longer appears