Skip to content

Commit

Permalink
Fix rrule import in bundle (#3617)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykoi18 committed Dec 23, 2022
1 parent 03643d7 commit cf2ac01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/dx-scheduler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-license": "^0.12.1",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-modify": "^3.0.0",
"tslib": "^2.4.1",
"typescript": "^4.8.4"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/dx-scheduler-core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ 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 @@ -25,6 +26,10 @@ 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 cf2ac01

Please sign in to comment.