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

Plugin not working in webpack v5 when moving from v4 #89

Open stijn7621 opened 1 year ago

stijn7621 commented 1 year ago

According to the docs I have to use overwrite: false to have allow arrays to be combined from several json files. However, also keys with strings gets converted into arrays. I think this is a bug. I would like to have an option to ONLY merge arrays and not keys with the same name. These should instead be overridden. I've downgraded to v1.0.21 to make this behaviour work as expected for webpack 5.

pixobe commented 1 year ago

@stijn7621 If possible could you create a minimal sample to reproduce this?

stijn7621 commented 1 year ago

Maybe later if i have time. You can reproduce it by creating two json files with the same property inside as string array and a seperate property as a string. I would like to merge those arrays and overwrite the second string property with the first. If i set overwrite false, the string property gets duplicated in the result file. This is because the old setting is removed in v5.

stijn7621 commented 6 months ago

@pixobe Any update on this. still not resolved