shellscape/webpack-manifest-plugin

Combination of seed and generate options not well documented

ZebraFlesh opened this issue · 3 comments

  • Manifest Plugin Version: 5.0.0.

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

By itself, the seed option makes sense. Similarly for the generate option. However, if you're using both options in a multi-compiler setting, the documentation is less than helpful in terms of how these options should be combined/used.

Your Proposal for Changes

Explicitly document that in a multi-compiler setup:

  • that the seed object is passed among compiler instances; and
  • the function specified for the generate option should accumulate its results into the seed object.

Failure to accumulate into the seed object causes the manifests to be overwritten. This is quite confusing if you're already specifying a seed: according to the docs, all you have to do is declare a shared object. Consulting the source code eventually provided the answer.

please feel free to provide suggestions on improvements

For the generate option, include something like:

In a multi-compiler environment, the manifest should be returned from the function as well as stored in the seed parameter. Each compiler invocation we consume the seed value from the previous invocation, including any modifications.

stale commented

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.