Angular 10 project with this library shows warning during build / serve
See original GitHub issueWhat I observed? I noticed this behavior only after upgrading angular application to version 10. Not sure if it’s really harmful, but thought I would bring this to community’s attention. The library seems to be working just fine (as before the upgrade)
STR / How I got there? Steps to reproduce the behavior:
- upgrade an existing project that uses this library to version 10
- run
ng build
,ng build --prod
, orng serve
command - A warning is logged about this library:
WARNING in D:\Projects\NgUI\node_modules\angular-oauth2-oidc\__ivy_ngcc__\fesm2015\angular-oauth2-oidc.js depends on js-sha256. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
link from the warning message: https://angular.io/guide/build#configuring-commonjs-dependencies
ng version (from within project)
...\...\NgApplication>ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 10.0.0
Node: 12.18.1
OS: win32 x64
Angular: 10.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1000.0
@angular-devkit/build-angular 0.1000.0
@angular-devkit/build-optimizer 0.1000.0
@angular-devkit/build-webpack 0.1000.0
@angular-devkit/core 10.0.0
@angular-devkit/schematics 10.0.0
@ngtools/webpack 10.0.0
@schematics/angular 10.0.0
@schematics/update 0.1000.0
rxjs 6.5.5
typescript 3.9.5
webpack 4.43.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >Angular CLI Error: The serve command requires to be run in ...
This error occurs when the project you are running is not an angular project. Though you have downloaded an angular project ...
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >Creating libraries - Angular
The public API for your library is maintained in the public-api.ts file in your library folder. Anything exported from this file is made...
Read more >Angular compiler options
Configuration inheritance with extendslink. Like the TypeScript compiler, the Angular AOT compiler also supports extends in the angularCompilerOptions section ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for pointing this out. The good message is, this is only an optical issue: This is because js-sha256 is a tiny lib (9 K) which cannot really be optimized b/c it only contains one function we need all the time.
I will investigate how to make this warning disappear.
Just an update on this one: I no longer see this warning after upgrading this library to its latest version (10.0.1) as of now. https://www.npmjs.com/package/angular-oauth2-oidc/v/10.0.1
Angular app has also been migrated to latest version.
ng version (from within project)