tettusud / merge-jsons-webpack-plugin

This plugin is used to merge json files into single json file,using glob or file names
https://npmjs.com/package/merge-jsons-webpack-plugin
Apache License 2.0
36 stars 20 forks source link

Allow null in final output #10

Closed adamholdenyall closed 7 years ago

adamholdenyall commented 7 years ago

Great plugin that is easy to set up. However, I found that if I had a null value in a source file, it would result in {} instead of null in the final output. This change seemed to fix that.

adamholdenyall commented 7 years ago

May actually need to be changed to

if (source[key] === null && (target[key] === undefined || target[key] === null)) {

to allow null on top of null outputting null

tettusud commented 7 years ago

@adamholdenyall Thank you very much for highlighting the issue and also providing the fix, i have made necessary changes and published a new version 1.0.5 to the repository.

adamholdenyall commented 7 years ago

Awesome! Thanks for the hard work you've done on this project!