Angular merge multiple JSON files into one

Viewed 456

I am trying to configure the i18next framework for translations in my angular app. I would like to have multiple JSON files (one per view or part of application) e.g home, catalogue.

The way I want to approach this is I want to put all of these in the assets folder under translations so the structure will look like this.

-home.json

-catalogue.json

Then eventually when the build runs I want to bundle all of these into a single json file: for example en-GB.json.

The problem I am facing is I don't know how to go about this. I can't locate the webpack config and if I was to introduce one, what would be the impact?

In short how can I bundle multiple JSON files into one file.

0 Answers
Related