Skip to content

Commit c7e19a5

Browse files
CB-6249 No icons in the app for windows builds (#3267)
* 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>
1 parent 0ac2bc7 commit c7e19a5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

webapp/packages/product-base/src/copy-assets/copyAssetsPlugin.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ import { getAssets } from './getAssets.js';
1616

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

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

0 commit comments

Comments
 (0)