We are currently trying to get our AOT build to work with i18n.
The Angular i18n docs (https://angular.io/guide/i18n) say ngc needs some arguments to make AOT include translation files:
./node_modules/.bin/ngc --i18nFile=./locale/messages.es.xlf --locale=es --i18nFormat=xlf
We found that NgcWebpackPlugin has an option called cliOptions that gets transformed to a instance of NgcCliOptions. So we tried to configure NgcWebpackPlugin in our webpack config as follows:
But nothing happens... no error but also no translations. Are we missing something? Is anything wrong with options object? We couldn't find any examples out there. Or is there anything else we need to do or include to get translations compiled into the AOT build?
We are currently trying to get our AOT build to work with i18n. The Angular i18n docs (https://angular.io/guide/i18n) say ngc needs some arguments to make AOT include translation files:
./node_modules/.bin/ngc --i18nFile=./locale/messages.es.xlf --locale=es --i18nFormat=xlf
We found that NgcWebpackPlugin has an option called cliOptions that gets transformed to a instance of NgcCliOptions. So we tried to configure NgcWebpackPlugin in our webpack config as follows:
But nothing happens... no error but also no translations. Are we missing something? Is anything wrong with options object? We couldn't find any examples out there. Or is there anything else we need to do or include to get translations compiled into the AOT build?