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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant