Skip to content

Commit

Permalink
Fix (build-tools): Only treat dependencies of ckeditor5 and `ckedit…
Browse files Browse the repository at this point in the history
…or5-premium-feature` as external when added to the `external` array.
  • Loading branch information
filipsobol committed May 17, 2024
1 parent f078955 commit d649a83
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/ckeditor5-dev-build-tools/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit d649a83

Please sign in to comment.