Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-2748

Optimize importing from @patternfly/react-tokens

XMLWordPrintable

    • 2
    • False
    • None
    • False
    • GITOPS Sprint 238

      Description of problem:
      Sometimes builds fail because react-tokens import is so large it causes timeout errors. 

      In many files we are importing from @patternfly/react-tokens using a format like:  

       import { something } from '@patternfly/react-tokens'  

      Whenever we do that webpack has to parse 12k different token files. This caused a build failure in recent PF latest smoketesting.  It also increases build time.   It's much better to import a specific file, like: 

      import something from '@patternfly/react-tokens/dist/esm/something'

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. <steps>

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Intermittent

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

      See this related issue in bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1952111 

              yicai@redhat.com Yi Cai
              rescott1 Regina Scott (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: