[ 
https://issues.apache.org/jira/browse/ARTEMIS-5600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Grzybek resolved ARTEMIS-5600.
---------------------------------------
    Resolution: Fixed

Fixed 
[here|https://github.com/apache/activemq-artemis-console/commit/2a6ea0d1a4a7e6afdd884fe885f0497b9076719f].

Instead of simply importing:
{code:javascript}
import { CubesIcon } from "@patternfly/react-icons";
{code}

I used:
{code:javascript}
import { CubesIcon } from "@patternfly/react-icons/dist/esm/icons/cubes-icon";
{code}

this allows webpack's _tree shaking_ to save huge amount of space, because we 
import (include in the bundle) only the icons we need.
Remember - Patternfly defines each icon in single JavaScript module (i.e., 
JavaScript file)

> We can import individual icons instead of using "from @patternfly/react-icons"
> ------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5600
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5600
>             Project: ActiveMQ Artemis
>          Issue Type: Task
>          Components: Web Console
>            Reporter: Grzegorz Grzybek
>            Priority: Major
>
> In Hawtio we have https://github.com/hawtio/hawtio-next/commit/a9c2937d
> This greatly decreases bundle size.
> In DEV mode it's 32MB (from previous 37MB)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to