Skip to content

chore(web): manually split bundle into multiple chunks #6985

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

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jun 3, 2025

It's really hard to make webpack to bundle both for target web and use require imports for its internal module system so that when used as a library, another bundler can actually recognize imports in the code. To work around that we add this manual chunk splitting logic for the production build.

Work in progress, I got pretty far with using webpack chunk splitting and forcing it to produce a build targeting web that can be consumed as a library by other bundling tooling (that's basically what we need for mms) instead of this hack, but will need to pause for a little, opening to not lose track of this and just in case if we become totally blocked on this

It's really hard to make webpack to bundle both for target web
and use require imports for its internal module system, to work
around that we add this manual chunk splitting logic for the
production build.
@gribnoysup gribnoysup added the wip label Jun 3, 2025
@gribnoysup gribnoysup added no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) and removed wip labels Jun 11, 2025
@gribnoysup gribnoysup marked this pull request as ready for review June 11, 2025 08:25
@gribnoysup
Copy link
Collaborator Author

Opening for review with added todo as diagramming package is once again getting us over the limit

@gribnoysup gribnoysup merged commit 1cebaa0 into main Jun 11, 2025
61 of 62 checks passed
@gribnoysup gribnoysup deleted the compass-web-split-bundle branch June 11, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants