-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update or replace base64-js and js-sha256 #15769
Comments
We're now facing the same issue. Is there any update on this? |
Using vite, I also get this warning, because js-sha256 seems to be deprecated:
|
Same issue with Angular 15. I suppressed the warnings by adding
in the angular.json. |
Hi! If you got an error in console, like "caught SyntaxError: The requested module '/node_modules/base64-js/index.js?v=46b70b48' does not provide an export named 'default' (at keycloak.mjs?v=46b70b48:1:8)"; |
More specifically, in the
{
"name": "app-name",
....
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
....
"allowedCommonJsDependencies": ["flat", "base64-js", "js-sha256"],
....
}
}
}
} |
Could this be related with emn178/js-sha256#18 ? (The one mentioned in #15769 (comment) ) |
Thanks for reminding me @combacsa. It does indeed look like this issue is now resolved as the new version of |
This issue is not solved, the (basically unmaintained) package js-sha256 has only removed |
@prewk You are right, I had this confused for a different issue. Reopening. |
If anyone knows a good alternative to I am willing to entertain the idea of making a breaking change to Keycloak JS by using the Web Crypto API if it allows us to shed some dependencies. This would be a breaking change as some of our methods, as that API is async, and a lot of our public API is not. |
We no longer need to replace |
…oak#15769) Signed-off-by: Stephan Schreiber <[email protected]>
…eycloak#30667) Closes keycloak#15769 Signed-off-by: Stephan Schreiber <[email protected]> Signed-off-by: npriebe <[email protected]>
Wanted to give a quick status update here, thanks to @schreibse we managed to replace However, I am experimenting with the Web Crypto API and I think we can drop the dependency altogether (see #33251). Feel free to try it out and let me know what you think! If this works out well I think we'll see if we can make Keycloak JS entirely dependency free. |
Description
update or replace base64-js and js-sha256:
Warning: /.../oss/keycloak-angular/example/node_modules/keycloak-js/dist/keycloak.mjs depends on 'base64-js'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Warning: /.../oss/keycloak-angular/example/node_modules/keycloak-js/dist/keycloak.mjs depends on 'js-sha256'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Discussion
No response
Motivation
cause optimization bailouts
Details
N/A
The text was updated successfully, but these errors were encountered: