Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix esm bundle #3629

Merged
merged 10 commits into from
Jan 26, 2023
6 changes: 5 additions & 1 deletion packages/dx-react-grid-material-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ 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} from '@mui/icons-material/esm/${path}.js';`,
}),
modify({
find: /import (.+) from '@mui\/x-date-pickers\/(.+)';/,
replace: (match, name, path) => `import ${name} from '@mui/x-date-pickers/${path}/index.js';`,
}),
],
},
Expand Down
8 changes: 0 additions & 8 deletions packages/dx-react-scheduler-material-ui/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
"plugins": [
["transform-react-remove-prop-types", {
"mode": "unsafe-wrap"
}],
["transform-rename-import", {
"replacements": [
{
"original": "^@mui\\/x-date-pickers\\/(.*)$",
"replacement": "@mui/x-date-pickers/node/$1/index.js"
}
]
}]
],
"env": {
Expand Down
1 change: 0 additions & 1 deletion packages/dx-react-scheduler-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"babel-eslint": "^10.0.3",
"babel-jest": "^29.2.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-plugin-transform-rename-import": "^2.3.0",
"core-js": "^3.4.1",
"enzyme": "3.10.0",
"eslint": "^6.6.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/dx-react-scheduler-material-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ 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} from '@mui/icons-material/esm/${path}.js';`,
}),
modify({
find: /import (.+) from '@mui\/x-date-pickers\/(.+)';/,
replace: (match, name, path) => `import ${name} from '@mui/x-date-pickers/${path}/index.js';`,
}),
],
},
Expand Down
5 changes: 0 additions & 5 deletions packages/dx-scheduler-core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import license from 'rollup-plugin-license';
import { default as typescriptRollup } from 'rollup-plugin-typescript2';
import replace from '@rollup/plugin-replace';
import typescript from 'typescript';
import modify from 'rollup-plugin-modify';
import {
banner, external, globals, stubProcess,
} from '../../tools/rollup-utils';
Expand All @@ -26,10 +25,6 @@ export default {
'/** @class */': '/*#__PURE__*/',
delimiters: ['', ''],
}),
modify({
find: /import {(.+)} from 'rrule';/,
replace: (match, name) => `import rrulePkg from 'rrule/dist/es5/rrule.js'; const {${name}} = rrulePkg;`,
}),
license({
banner,
}),
Expand Down