shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.44k stars 185 forks source link

Allow content serialization to be modified #122

Closed tylerbwilliams closed 6 years ago

tylerbwilliams commented 6 years ago

Currently, the content returned from the generate function is then passed to JSON.stringify. We don't get the chance to use a different serialization model.

My use case is that I want to create a manifest.properties file instead of a manifest.json file. I can write my own generate function to create the output as a valid properties file, but then JSON.stringify wraps it in quotes and escapes all my newlines.

Can we have a serialize option that defaults to JSON.stringify, for those who want their own strategy for this?

mastilver commented 6 years ago

~Can you send a PR please?~

EDIT: just realised #123 is doing that

mastilver commented 6 years ago

done in https://github.com/danethurber/webpack-manifest-plugin/pull/123