nickjj / manifest-revision-webpack-plugin

Write out a manifest file containing your versioned webpack chunks and assets.
ISC License
124 stars 40 forks source link

Don't stringify formatter output data when it is already a primitive … #7

Closed mlegenhausen closed 8 years ago

mlegenhausen commented 8 years ago

Currently it is only possible to return a js object from the formatter. This breaks when you want to create a file (like a browserconfig.xml) that is not a json file.

This pull request solves the problem by only calling JSON.stringify when the return type from the formatter is an Object or Array.

nickjj commented 8 years ago

Thanks for the contribution. That's a use case I haven't thought of.