-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Improve Docs #104
Improve Docs #104
Conversation
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 78 78
=====================================
Hits 78 78 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Great :)
Just a couple thinks
@@ -93,13 +93,31 @@ Type: `function` | |||
|
|||
Filter out files. [more details](#hooks-options) | |||
|
|||
**Use-case**: Omit [dll-chunks] ([issue](https://github.com/danethurber/webpack-manifest-plugin/issues/46)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not specific to dll chunks, also dynamic one (when you use import(...).then(...)
)
**Use-case**: Add hash information to manifest file for [SRI] ([issue](https://github.com/danethurber/webpack-manifest-plugin/issues/35), [issue](https://github.com/danethurber/webpack-manifest-plugin/issues/55)): | ||
```js | ||
map: ({chunk, file}) => ({ file, hash: chunk.source.integrity }), | ||
generate: (seed, files) => files.reduce((manifest, {name, path}) => manifest), seed), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that is working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure too 😂
I just rewrited from reduce
to generate
after:
map: ({chunk, file}) => {
return {
file,
hash: chunk.source.integrity
};
}
reduce: (manifest, {chunk, file}) => {
return manifest;
}
default generate is:
`(seed, files) => files.reduce((manifest, {name, path}) => ({...manifest, [name]: path}), seed)`
Thanks for opening this PR a while back, and I'm sorry that it didn't get attention sooner. We've updated the documentation as part of #222. If you'd like to add examples to the various methods, please open a new issue with your suggestions and we can talk about the concept of a |
webpack-manifest-plugin-after-emit
hook. #103webpack-manifest-plugin-after-emit
hook