diff --git a/adminSiteServer/app.tsx b/adminSiteServer/app.tsx index abf91742baf..3eee4db8ce5 100644 --- a/adminSiteServer/app.tsx +++ b/adminSiteServer/app.tsx @@ -105,7 +105,7 @@ export class OwidAdminApp { app.use("/fonts", express.static("public/fonts")) app.use("/api", publicApiRouter.router) - app.use("/admin/assets", express.static("dist/admin/assets")) + app.use("/assets-admin", express.static("dist/assets-admin")) app.use("/admin/api", apiRouter.router) app.use("/admin/test", testPageRouter) app.use("/admin/storybook", express.static(".storybook/build")) diff --git a/baker/SiteBaker.tsx b/baker/SiteBaker.tsx index 2bb7fbbbc62..c1090271120 100644 --- a/baker/SiteBaker.tsx +++ b/baker/SiteBaker.tsx @@ -937,6 +937,10 @@ export class SiteBaker { await execWrapper( `rm -rf ${this.bakedSiteDir}/assets && cp -r ${BASE_DIR}/dist/assets ${this.bakedSiteDir}/assets` ) + await execWrapper( + `rm -rf ${this.bakedSiteDir}/assets-admin && cp -r ${BASE_DIR}/dist/assets-admin ${this.bakedSiteDir}/assets-admin` + ) + await this.validateTagIcons(trx) await execWrapper( `rsync -hav --delete ${BASE_DIR}/public/* ${this.bakedSiteDir}/ ${excludes}` diff --git a/site/viteUtils.tsx b/site/viteUtils.tsx index c0b35009459..ad5bb242c82 100644 --- a/site/viteUtils.tsx +++ b/site/viteUtils.tsx @@ -144,7 +144,7 @@ export const createTagsForManifestEntry = ( const prodAssets = (entry: string, baseUrl: string): Assets => { const baseDir = findBaseDir(__dirname) const manifestBasePath = `${baseDir}/dist/` - const manifestDirs = ["assets", "admin/assets"] + const manifestDirs = ["assets", "assets-admin"] let mergedManifest try { mergedManifest = manifestDirs.reduce((acc, path) => { diff --git a/vite.config-admin.mts b/vite.config-admin.mts index b89141e0efc..dc11924916a 100644 --- a/vite.config-admin.mts +++ b/vite.config-admin.mts @@ -4,5 +4,5 @@ import { defineViteConfigForEntrypoint } from "./vite.config-common.mts" export default defineViteConfigForEntrypoint( "admin", VITE_ASSET_ADMIN_ENTRY, - "dist/admin/assets" + "dist/assets-admin" )