Skip to content

@mui/icons-material imports balloon bundle sizes #2350

@semery-fractalev

Description

@semery-fractalev

Describe the bug

In c8d3ecf, the way material-icons were imported was changed (purportedly to deal with typescript incompatibilities). However, this causes the entire module to be imported on build, not just the few icons that are required.

If/when possible, the imports should switch back to "Option 1" described here: https://mui.com/material-ui/icons/#usage

Expected behavior

When using the material-renderers bundle size is not adversely affected by imports.

Steps to reproduce the issue

  1. Upgrade the versions of the below from 3.1.0 to 3.3.0
"@jsonforms/core": "^3.3.0",
"@jsonforms/material-renderers": "^3.3.0",
"@jsonforms/react": "^3.3.0",
  1. Notice a large increase in bundle size and compile time

Screenshots

No response

Which Version of JSON Forms are you using?

v3.3.0

Framework

React

RendererSet

Material

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions