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

Getting file not found for Dynamic Generated files #25

Closed nishantkagrawal closed 6 years ago

nishantkagrawal commented 6 years ago

I am using webpack-angular-translate plugin to dynamically generate a json file (say A.json) and then merge it with an existing json (say B.json).

I get ERROR in MergeJsonWebpackPlugin: MergeJsonWebpackPlugin: Unable to locate file A.json

Is it possible to merge the files from compilation.assets?

I tried with the following change to readFile and it worked for me https://github.com/nishantkagrawal/merge-jsons-webpack-plugin/commit/e4afddcb263a82bb0915911a22218d8f81b5c86e

tettusud commented 6 years ago

@nishantkagrawal HI I will test once and release a new version.Thank you for helping with the code.

tettusud commented 6 years ago

@nishantkagrawal i have published new version 1.0.13 ,could you please check that? You do not need to mention anything separately to use files from assets. By default it will check for files if not found on the path.It will look for assets ,and load it .Could you review the code if its fine?

nishantkagrawal commented 6 years ago

Works as expected! Code looks good as well! Thanks!