[core-docs] Use type-only imports for type-only references by JCQuintas · Pull Request #48386 · mui/material-ui (original) (raw)

@JCQuintas

Vite 8 uses Rolldown for production builds, which is stricter than Rollup about value-imports referencing names that have no runtime export. Several files import types like Theme, ThemeOptions, SxProps as value-imports from @mui/material/styles or @mui/system; Rolldown then fails with "X is not exported by ..." because those names exist only in declaration files.

Add the inline type modifier (or use import type) so the imports are erased at compile time and never reach the bundler.

@JCQuintas added the scope: docs-infra

Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

label

Apr 29, 2026

@JCQuintas

@JCQuintas

@JCQuintas

mui/mui-public#1357 makes consistent-type-imports always-on in the shared base config, so the per-package override here would become redundant once material-ui bumps @mui/internal-code-infra.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})