Skip to content

Conversation

@mkgs
Copy link

@mkgs mkgs commented Sep 19, 2018

If the SPLIT_CHUNKS config option is set, get all split chunks for a given bundle name. Assumes that split chunk names contain bundle names separated by a tilde character.

If the SPLIT_CHUNKS config option is set, get all split chunks for a given bundle name. Assumes that split chunk names contain bundle names separated by a tilde character.
If the SPLIT_CHUNKS config option is set, allow loading of multiple bundles at once. Ensures we load common dependencies only once.
@timkindberg
Copy link

@mkgs I actually did the same work you did (it was nice to see we had the same approach) and submitted a PR. But then I closed it because the author does not seem to respond, AND I found a better approach.

I found that it's better to fork the webpack-bundle-tracker npm package instead and write the correct bundles for chunks into the webpack-stats.json. You can see my forked and commit here: timkindberg/webpack-bundle-tracker@00341b4

The reason this is better is because if the names of chunks get too long they get truncated, so the logic in your PR (and mine) doesn't work because the bundle name might not appear in the chunk name. However, the approach linked above works.

@mkgs
Copy link
Author

mkgs commented Nov 20, 2019

@timkindberg Thanks, I'll take a look at your npm package fork. I haven't run into the truncating issue yet, but good to know there is a solution if it happens.

@fjsj fjsj self-requested a review April 30, 2021 18:36
@fjsj fjsj self-assigned this Apr 30, 2021
@rvlb
Copy link
Contributor

rvlb commented May 5, 2021

Closing as this behavior is achieved by using webpack-bundle-tracker@v1.0.0-alpha.1 in conjunction with PR #232 changes.

@rvlb rvlb closed this May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants