Skip to content

Commit

Permalink
fix: Fix esm bundle (#3629)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykoi18 authored Jan 26, 2023
1 parent 15f2d60 commit a97d9d9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
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

0 comments on commit a97d9d9

Please sign in to comment.