In the release notes for Cocos Creator 2.4.3, it says:
Optimize the size of the JSON file after construction, and merge all JSON, which can reduce the size of JSON by up to 30%
But I don’t see any changes between the previous builds, and I also don’t see what merge all JSON is doing. In my FBInstant builds, I still see multiple json files per bundle. Lots of json files for my app.
What exactly does merge all JSON do? Is there a way to get these json files compiled into 1? I think that would be a nice improvement in loading times for Cocos HTML5 builds.
You can see in my screenshot, assets/Attack is a bundle. There are 8 json files in subdirectories and another config.json in the main folder. So that’s 9 json files in a single asset bundle. I would expect those would be getting merged together.
Hi SantyWang, thanks for the response!
I have tried both Merge All Json and Default for the compression type. Both options have the same result as in my screenshot - lots of different json files.
Maybe this doesn’t work for Facebook Instant builds?
Or maybe it’s merging some other json files together, not the ones from my screenshot?
I figured it out. That build setting is a setting on every asset bundle. Setting it to Merge All Json now is giving me 1 json file per bundle =)
Awesome, thanks!