Good morning guys. I'm using the ng2-translate plugin in my application, running tns run ios works perfectly. But when running with the command tns run ios --bundle --env.uglify --env.aot the webpack does the copying without giving any error, but the error app when opening:
CONSOLE LOG file:///app/vendor.js:1:1200993:
CONSOLE ERROR file:///app/vendor.js:1:28276: ERROR TypeError: this.http.get(this.prefix+"/"+e+this.suffix).map is not a function. (In 'this.http.get(this.prefix+"/"+e+this.suffix).map(function(e){return e.json()})', 'this.http.get(this.prefix+"/"+e+this.suffix).map' is undefined)
CONSOLE ERROR file:///app/vendor.js:1:1125775: bootstrap: ERROR BOOTSTRAPPING ANGULAR
CONSOLE ERROR file:///app/vendor.js:1:1125775: bootstrap: this.http.get(this.prefix+"/"+e+this.suffix).map is not a function. (In 'this.http.get(this.prefix+"/"+e+this.suffix).map(function(e){return e.json()})', 'this.http.get(this.prefix+"/"+e+this.suffix).map' is undefined)
getTranslation@file:///app/vendor.js:1:886381
getTranslation@file:///app/vendor.js:1:887491
retrieveTranslations@file:///app/vendor.js:1:887380
setDefaultLang@file:///app/vendor.js:1:886824
n@file:///app/bundle.js:1:88782
ka@file:///app/vendor.js:1:110925
Has anyone had this problem before?
I already tested this plugin with nativescript: https://www.npmjs.com/package/@ngx-translate/core but I did not succeed.
Yes it is added in the webpack, this is my current configuration:
};
If you are using JSON files for storing strings, make sure those are included in Webpack's copy plug-in config.