Skip to content

Path-based imports causing component files to explode in size #47386

@MordechaiWein

Description

@MordechaiWein

Summary

Hi team,

Because MUI recommends avoiding barrel imports (e.g., import { Box, Typography } from '@mui/material') for dev-performance reasons, we’re forced to use path-based imports for every single component:

import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
import Card from '@mui/material/Card';

In larger apps, this creates a real DX problem. Simple components end up with 10–15+ import lines, making files balloon in size and reducing readability. It feels unnecessarily repetitive and noisy.

Requested:
A supported, optimized way to import multiple components together without triggering the dev-performance issues that currently make barrel imports unusable (especially with Vite + MUI v5.15). Even an official “safe barrel” or generated import map would help tremendously.

This area impacts day-to-day productivity in a big way. Any guidance or plans to address this would be greatly appreciated.

Thanks

Examples

No response

Motivation

No response

Search keywords: imports

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions