Details

    • Type: Feature Request
    • Status: Triage (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0.2
    • Fix Version/s: None
    • Component/s: Adapter - JavaScript
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Currently keycloak-js is shipped in the CommonJS Module format. [This post|https://web.dev/commonjs-larger-bundles] has a full explanation on how this format was designed for server-side systems (NodeJS) and how it does not support efficient tree shaking and bundle size reduction for use in front-end web applications. It also includes a link to a Rollup module for generating ESM (ECMAScript Module) bundles.

      This article has more details on the ESM format and how imports work.

      Currently using keycloak-js in an Angular version 10+ application gives the following build warning:

       

      WARNING in /Git/my-app/node_modules/keycloak-angular/__ivy_ngcc__/fesm2015/keycloak-angular.js depends on 'keycloak-js'. CommonJS or AMD dependencies can cause optimization bailouts.
      For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
      

      That link has a brief explanation on how to silence these warnings and links to the 2 articles above.

      In order to allow applications using Keycloak on the front-end to be as efficient as possible (and best support the global community where 2G and 3G connections are common), keycloak-js should be published in ESM format.

      This can be in addition to the existing CommonJS format.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                splaktar Michael Prentice
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: