diff --git a/packages/dx-react-grid-material-ui/rollup.config.js b/packages/dx-react-grid-material-ui/rollup.config.js index 2ba7c29283..e288853685 100644 --- a/packages/dx-react-grid-material-ui/rollup.config.js +++ b/packages/dx-react-grid-material-ui/rollup.config.js @@ -40,7 +40,10 @@ export default [ ...commonPlugins, modify({ find: /import (\w+) from '@mui\/icons-material\/(.+)';/, - replace: (match, name, path) => `import ${name}Pkg from '@mui/icons-material/${path}.js'; const ${name} = ${name}Pkg.default;`, + replace: (match, name, path) => [ + `import ${name}Pkg from '@mui/icons-material/${path}.js';`, + `const ${name} = ${name}Pkg.default ? ${name}Pkg.default : ${name}Pkg;`, + ].join('\n'), }), ], }, diff --git a/packages/dx-react-scheduler-material-ui/rollup.config.js b/packages/dx-react-scheduler-material-ui/rollup.config.js index 2ba7c29283..e288853685 100644 --- a/packages/dx-react-scheduler-material-ui/rollup.config.js +++ b/packages/dx-react-scheduler-material-ui/rollup.config.js @@ -40,7 +40,10 @@ export default [ ...commonPlugins, modify({ find: /import (\w+) from '@mui\/icons-material\/(.+)';/, - replace: (match, name, path) => `import ${name}Pkg from '@mui/icons-material/${path}.js'; const ${name} = ${name}Pkg.default;`, + replace: (match, name, path) => [ + `import ${name}Pkg from '@mui/icons-material/${path}.js';`, + `const ${name} = ${name}Pkg.default ? ${name}Pkg.default : ${name}Pkg;`, + ].join('\n'), }), ], },