Skip to content

Commit 2733a64

Browse files
authored
[showcase] Fix custom versions for the showcase not serving assets correctly (#678)
* Fix custom versions for the showcase not serving assets correctly * Fix "start" script not working
1 parent f36c80c commit 2733a64

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"build.mer.common": "cd packages/mercury && bun build.scss.test-common",
2525
"build.un": "cd packages/unanimo && bun run build",
2626
"build.un.watch": "cd packages/unanimo && bun run build",
27-
"start": "bun dev.mercury && bun dev.mercury-build && bun dev.common && cd packages/showcase"
27+
"start": "bun dev.mercury && bun dev.mercury-build && bun dev.common && cd packages/showcase && bun start"
2828
},
2929
"workspaces": [
3030
"packages/*",
@@ -51,3 +51,4 @@
5151
"vitest": "~3.2.4"
5252
}
5353
}
54+

packages/mercury-build/src/build/build-mercury-for-usage.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DEFAULT_OUTPUT_FOLDERS_IN_FINAL_APPLICATION } from "../constants/default-folders-in-final-application.js";
12
import { TEMPORAL_BUILD_FOLDERS } from "../constants/temporal-build-folder.js";
23
import { ensureDirectoryExistsAndItsClear } from "../file-management/ensure-directory-exists-and-its-clear.js";
34
import { measureTime } from "../other/measure-time.js";
@@ -17,7 +18,18 @@ export const buildMercuryForUsage = (
1718

1819
await Promise.all([
1920
// Copy the fonts and icons to the node_modules/.genexus/mercury/assets/.. folder
20-
copyFontsAndIconsForUsage(TEMPORAL_BUILD_FOLDERS.OUT_DIR, buildOptions),
21+
copyFontsAndIconsForUsage(
22+
TEMPORAL_BUILD_FOLDERS.OUT_DIR,
23+
24+
// TODO: Revisit this way of passing options
25+
// We must use the default output folders here, because these files
26+
// must be copied to the standard location node_modules/.genexus/mercury/assets/...
27+
{
28+
fontsPath: DEFAULT_OUTPUT_FOLDERS_IN_FINAL_APPLICATION.FONTS,
29+
iconsPath: DEFAULT_OUTPUT_FOLDERS_IN_FINAL_APPLICATION.ICONS,
30+
globant: buildOptions.globant
31+
}
32+
),
2133
createBundlesWithCustomPaths(buildOptions, { silentLog })
2234
]);
2335
});

0 commit comments

Comments
 (0)