Problem Statement
I'm digging a bit on optimizing our bundles for an app that uses EUI. I noticed that we're loading EuiCodeBlock in EuiErrorBoundary only to wrap the error message and its title. But EuiCodeBlock is very powerful and often results in code that is rarely used (mainly for syntax highlighting).
Proposed Solution
Use a lighter component to help render the error message and title.
Value / Impact
- Reduce the app bundle size for consumers
- Reduce the amount of unused Javascript
Urgency
Not urgent.
Do alternatives or workarounds exist?
Lazily-loading EuiCodeBlock and EuiErrorBoundary to render them only when an actual error happens.
Problem Statement
I'm digging a bit on optimizing our bundles for an app that uses EUI. I noticed that we're loading EuiCodeBlock in EuiErrorBoundary only to wrap the error message and its title. But EuiCodeBlock is very powerful and often results in code that is rarely used (mainly for syntax highlighting).
Proposed Solution
Use a lighter component to help render the error message and title.
Value / Impact
Urgency
Not urgent.
Do alternatives or workarounds exist?
Lazily-loading EuiCodeBlock and EuiErrorBoundary to render them only when an actual error happens.