Skip to content

vite 8 MUI v5 toESM error #21850

@popuguytheparrot

Description

@popuguytheparrot

Describe the bug

are there any ways to configure it so that version 5 of mui works?

TypeError: (0 , __toESM(...).default) is not a function
var styled = (0, (/* @__PURE__ */ __toESM(require_createStyled())).default)({
	themeId: identifier_default,
	defaultTheme,
	rootShouldForwardProp
});

Reproduction

https://stackblitz.com/edit/vitejs-vite-pdut4evq

Steps to reproduce

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 22.22.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitejs/plugin-react: ^6.0.0 => 6.0.0 
    vite: ^8.0.0 => 8.0.0

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: upstreamBug in a dependency of Vitep4-importantViolate documented behavior or significantly improves performance (priority)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions