From d649a8359a69a56ad1b9ee5b052dbf6f446c105e Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Fri, 17 May 2024 17:18:31 +0200 Subject: [PATCH] Fix (build-tools): Only treat dependencies of `ckeditor5` and `ckeditor5-premium-feature` as external when added to the `external` array. --- packages/ckeditor5-dev-build-tools/src/config.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/ckeditor5-dev-build-tools/src/config.ts b/packages/ckeditor5-dev-build-tools/src/config.ts index f1b26ab19..36282b97e 100644 --- a/packages/ckeditor5-dev-build-tools/src/config.ts +++ b/packages/ckeditor5-dev-build-tools/src/config.ts @@ -65,8 +65,13 @@ export async function getRollupConfig( options: BuildOptions ) { * * This mapping can be removed when old installation methods are deprecated. */ - const coreRewrites = getPackageDependencies( 'ckeditor5' ); - const commercialRewrites = getPackageDependencies( 'ckeditor5-premium-features' ); + const coreRewrites = external.includes( 'ckeditor5' ) ? + getPackageDependencies( 'ckeditor5' ) : + []; + + const commercialRewrites = external.includes( 'ckeditor5-premium-features' ) ? + getPackageDependencies( 'ckeditor5-premium-features' ) : + []; external.push( ...coreRewrites, ...commercialRewrites );