Problem loading RainbowSDK after 1.76 upgrade
Hello.
I'm posted this issue https://github.com/Rainbow-CPaaS/StarterKit-SDKWeb-Angular2/issues/11 here after discover this forum. It is possible to get some help here?
Thanks.
-
Making some tests, I found that I can avoid this problem loading rainbowSDK building my Ionic project without "--prod" flag. With this command works well:
ionic build --engine=browser
But with this one doesn't works:
ionic build --prod --engine=browser
Any hint about what's going on? Thanks.
-
Well, as a temporal workaround I disabled "optimization" flag inside Ionic production build task config wich is doing the minification (and it works). But is not the desired behaviour because transpiled code is bigger than expected.
// angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": [
{
"input": "src/theme/variables.scss"
},
{
"input": "src/global.scss"
}
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": false,
// ...Thanks Konrad Hyzy
-
Check if the minifier has a 'mangle' option. For instance, Terser, the default minifier used by Webpack has one: https://webpack.js.org/plugins/terser-webpack-plugin/#terseroptions
-
Thanks Konrad Hyzy for your interested again, unfortunately Ionic + Angular + Webpack configuration is actually to hard for me.
I will keep Googling to try to resolve this problem.
Please sign in to leave a comment.
Comments
5 comments