Skip to content
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

docs: splitVendorChunkPlugin doesn't work with rollupOptions.output.manualChunks object syntax #12639

Closed
2 of 4 tasks
Ilanaya opened this issue Mar 29, 2023 · 1 comment · Fixed by #13431
Closed
2 of 4 tasks
Labels
contribution welcome documentation Improvements or additions to documentation

Comments

@Ilanaya
Copy link
Contributor

Ilanaya commented Mar 29, 2023

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

According to this comment (and actual build behavior), splitVendorChunkPlugin doesn't work with rollupOptions.output.manualChunks object form:

manualChunks: {
  lodash: ['lodash']
}

I think this should be mentioned in the docs section as it may cause confusion. And, as I can see, there is really no quick way to acquire the information of the incompatibility except finding the mentioned comment.

Your Suggestion for Changes

Current docs string:
...You can continue to use the Split Vendor Chunk strategy by adding the splitVendorChunkPlugin in your config file:

My proposal:
"...You can continue to use the Split Vendor Chunk strategy by adding the splitVendorChunkPlugin in your config file (important, you should use rollupOptions.output.manualChunks function form when enabling this plugin for correct work)"

Would gladly make PR myself if the you agree this should be mentioned in docs in some form

Reproduction

No response

Steps to reproduce

No response

@Ilanaya Ilanaya added the documentation Improvements or additions to documentation label Mar 29, 2023
@sapphi-red
Copy link
Member

@maIIady
The proposal looks good to me. Maybe adding a warning container is better.
Also it would be nice to output a warning here.

// else, leave the object form of manualChunks untouched, as
// we can't safely replicate rollup handling.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution welcome documentation Improvements or additions to documentation
Projects
None yet
2 participants