Skip to content

Commit

Permalink
Merge pull request #961 from ckeditor/fix-crash-on-windows
Browse files Browse the repository at this point in the history
Fix (build-tools): Fix banner path resolution that prevents the package from being built on Windows. Closes ckeditor/ckeditor5#16578.
  • Loading branch information
psmyrek authored Jun 17, 2024
2 parents 9058adf + 6528ebb commit 12d309c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ckeditor5-dev-build-tools/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import fs from 'fs';
import url from 'url';
import util from 'util';
import chalk from 'chalk';
import path from 'upath';
Expand Down Expand Up @@ -130,7 +131,8 @@ async function normalizeOptions( options: Partial<BuildOptions> ): Promise<Build
* Replace banner path with the actual banner contents.
*/
if ( normalized.banner ) {
const { banner } = await import( normalized.banner );
const { href } = url.pathToFileURL( normalized.banner );
const { banner } = await import( href );

normalized.banner = banner;
}
Expand Down

0 comments on commit 12d309c

Please sign in to comment.