OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Warning deploying Poudre Basin Information #346

Closed smalers closed 3 years ago

smalers commented 3 years ago

I ran the script to deploy the website and see the following warnings, which I have not seen before. What are they and should we be concerned?

 ./copy-to-owf-amazon-s3.sh --aws-profile=owf-steve
[WARNING] Checking Angular version is not implemented.  Continuing.
[INFO] scriptFolder:             /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-infomapper-poudre/build-util
[INFO] Program name:             copy-to-owf-amazon-s3.sh
[INFO] repoFolder:               /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-infomapper-poudre
[INFO] webFolder:                /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-infomapper-poudre/web
[INFO] appConfigFile:            /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-infomapper-poudre/web/app-config.json
[INFO] gitReposFolder:           /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos
[INFO] infoMapperRepoFolder:     /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-app-infomapper-ng
[INFO] infoMapperMainFolder:     /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-app-infomapper-ng/infomapper
[INFO] infoMapperDistFolder:     /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-app-infomapper-ng/infomapper/dist
[INFO] infoMapperDistAppFolder:  /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-app-infomapper-ng/infomapper/dist/infomapper
[INFO] Application version:  1.0.0
[INFO] InfoMapper version:   1.4.0
[INFO]
[INFO] Regenerating Angular dist folder to deploy the website...
[INFO] Changing to:  /c/Users/sam/owf-dev/InfoMapper-Poudre/git-repos/owf-app-infomapper-ng/infomapper
[INFO] Start running:  ng build --prod=true --aot=true --baseHref=. --extractCss=true --namedChunks=false --outputHashing=all --sourceMap=false
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {3} polyfills-es5.0a71fc79e3f113b451c8.js (polyfills-es5) 129 kB [initial] [rendered]
chunk {2} polyfills-es2015.9b1ed5a967257a16d123.js (polyfills) 36.1 kB [initial] [rendered]
chunk {0} runtime-es2015.66c79b9d36e7169e27b0.js (runtime) 1.45 kB [entry] [rendered]
chunk {0} runtime-es5.66c79b9d36e7169e27b0.js (runtime) 1.45 kB [entry] [rendered]
chunk {1} main-es2015.bb8759648022ef0cd2cc.js (main) 3.34 MB [initial] [rendered]
chunk {1} main-es5.bb8759648022ef0cd2cc.js (main) 3.52 MB [initial] [rendered]
chunk {4} styles.46263897ee6673705d38.css (styles) 265 kB [initial] [rendered]
chunk {scripts} scripts.f578a8c52d86edb30a5d.js (scripts) 3.61 MB [entry] [rendered]
Date: 2020-11-30T22:54:53.574Z - Hash: 9093d86ba71a6e625ae9 - Time: 157588ms

WARNING in C:\Users\sam\owf-dev\InfoMapper-Poudre\git-repos\owf-app-infomapper-ng\infomapper\src\app\map-components\map.component.ts depends on 'papaparse'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in C:\Users\sam\owf-dev\InfoMapper-Poudre\git-repos\owf-app-infomapper-ng\infomapper\src\app\map-components\map.component.ts depends on 'georaster-layer-for-leaflet'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in C:\Users\sam\owf-dev\InfoMapper-Poudre\git-repos\owf-app-infomapper-ng\infomapper\src\app\map-components\map.component.ts depends on 'jquery'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in C:\Users\sam\owf-dev\InfoMapper-Poudre\git-repos\owf-app-infomapper-ng\infomapper\src\app\map-components\map.component.ts depends on 'geoblaze'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in C:\Users\sam\owf-dev\InfoMapper-Poudre\git-repos\owf-app-infomapper-ng\infomapper\src\app\map-components\map.component.ts depends on 'georaster'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in budgets: bundle initial-es2015 exceeded maximum budget. Budget 2 MB was not met by 5.24 MB with a total of 7.24 MB.

WARNING in budgets: bundle initial-es5 exceeded maximum budget. Budget 2 MB was not met by 5.51 MB with a total of 7.51 MB.
Nightsphere commented 3 years ago

The changes have been pushed with fixes for all warnings except for the budgets. Will close after Steve confirms they have disappeared.

Nightsphere commented 3 years ago

The InfoMapper's angular.json file contains a list of 'common JS' dependencies that are allowed in the project. Angular suggests not to use common JS packages and instead use ECMAScript modules. Using the older common JS modules can prevent bundlers and minifiers from optimizing an application. Some of these packages are necessary for the InfoMapper to function, such as geoblaze and georaster-layer-for-leaflet, but might not have the option.

The warnings will not show up anymore, and the InfoMapper's bundle sizes might be larger because of this. I will keep a lookout for trying to find ways to use these modules in a better way, and update them as I find solutions for each.

Nightsphere commented 3 years ago

Adding the older but necessary JS packages to the angular.json commonJS depenendency array stops the warnings, and won't be an issue for the InfoMapper going into the future. Closing this issue.