Skip to content

Commit

Permalink
CB-6249 No icons in the app for windows builds (#3267)
Browse files Browse the repository at this point in the history
* CB-6249 fixes adding assets to the build for windows machines

* СB-6249 fixes the path for windows

* CB-6249 normalizes paths for build assets

* CB-6249 adds comment for assets

* CB-6249 normalizes paths to posix format

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
  • Loading branch information
sergeyteleshev and EvgeniaBzzz authored Feb 21, 2025
1 parent 0ac2bc7 commit c7e19a5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ import { getAssets } from './getAssets.js';

export function copyAssetsPlugin(): Plugin {
// let rootPath = fileURLToPath(import.meta.url);
const assets = getAssets(fs.join(process.cwd(), 'package.json'));
const normalizedAssets = assets.map(asset =>
fs
.normalize(`${asset}/**`)
// the DynamicPublicDirectory plugin expects paths to be in posix format (to include images and fonts for windows)
.replace(/\\/g, '/'),
);

return DynamicPublicDirectory(getAssets(fs.join(process.cwd(), 'package.json')).map(v => `${v}/**`)) as any;
return DynamicPublicDirectory(normalizedAssets) as any;
// return {
// name: 'copy-assets',
// configResolved(config) {
Expand Down

0 comments on commit c7e19a5

Please sign in to comment.