1
votes

My Angular2 app is using ng2-translate module and 'en.json' file contains translation. This is all working well in dev mode when built end deployed with angular-cli. But when built in prod mode, and deployed to WildFly, en.json is not found and translation is not loaded.

How to build app in prod mode, so en.json is packed inside dist directory?

1

1 Answers

1
votes

Yes, this issue is related to the webpack configuration employed by angular-cli. In the current state the ng build command keeps content of src/assets directory in the dist directory.

So you can put your files needed to the src/assets - they should be present in a dist build.