-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Improvements on SplitChunks article #1956
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
Comments
As always, I can help, but need the knowledge 😄 |
What is the signature for this function? |
@glen-84 that's a missing thing right now. (Added to the issue description) |
Would this be a good place to request documenting how to pass a function to |
Actually I'm not 100% clear what the regex version of |
Fixed by #2183? Or are there still some parts that are unclear?
|
@chrisdothtml do you feel you've covered what was mentioned in my initial description? If that's the case we can close it for sure. |
I think these ones were covered by my PR
Looks like this mostly already exists on the optimization page. Only thing I can see missing is the function signature
Don't think this exists anywhere currently. Perhaps it could be provided in a tip somewhere on the splitChunks page? |
Thanks @chrisdothtml , it's a bit more fleshed out, but I'm not sure it's done. The updated docs say that the function takes one argument, "chunks" (without any description of the type of that argument!). In my testing (webpack 4.8.3) it looks like the callback is actually invoked with two arguments. I logged the prototype of each argument and I see output like So, what I'd like to see is:
As I said on another issue, my main focus is helping users who either don't have experience with code splitting or didn't fully grok how it worked in the older plugin (like me). |
I think the documentation could still be improved.
|
Not entirely convinced that this was solved. As @thw0rted mentioned, the knowledge required to effectively configure There are several resources online (vid, slides) that try to fill in the gaps, although short of reading the source code, wouldn't it be worthwhile, considering that through the config we can access some of these objects, to add a section in the documentation that covers Webpack's internals? |
Besides the fact that the document might need some gardening and organization, there are some stuff that I couldn't completely get from the codebase or the config so there are some requests and gaps that might need to be filled.
Specially these:
name
optionArticle pull request is #1955
The text was updated successfully, but these errors were encountered: