From cf2ac01ba4b6819f0565d9af72030c7df7dfdb7d Mon Sep 17 00:00:00 2001 From: Georgy K <36447502+Lykoi18@users.noreply.github.com> Date: Fri, 23 Dec 2022 23:04:33 +0800 Subject: [PATCH] Fix rrule import in bundle (#3617) --- packages/dx-scheduler-core/package.json | 1 + packages/dx-scheduler-core/rollup.config.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/dx-scheduler-core/package.json b/packages/dx-scheduler-core/package.json index 4f0be91d31..b341b42c93 100644 --- a/packages/dx-scheduler-core/package.json +++ b/packages/dx-scheduler-core/package.json @@ -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" }, diff --git a/packages/dx-scheduler-core/rollup.config.js b/packages/dx-scheduler-core/rollup.config.js index da364b5df5..64148c3039 100644 --- a/packages/dx-scheduler-core/rollup.config.js +++ b/packages/dx-scheduler-core/rollup.config.js @@ -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'; @@ -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, }),