From 2f8c7c7b0db9d6ea9c668c57b038dab6b69f3c4f Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Wed, 18 Dec 2024 12:47:19 +0530 Subject: [PATCH 1/2] chore: remove dead code --- esbuild/utils.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/esbuild/utils.js b/esbuild/utils.js index 3c39171b8a..da5b33a5f4 100644 --- a/esbuild/utils.js +++ b/esbuild/utils.js @@ -41,17 +41,6 @@ const bundle_map = app_list.reduce((out, app) => { const get_public_path = (app) => public_paths[app]; -const get_build_json_path = (app) => path.resolve(get_public_path(app), "build.json"); - -function get_build_json(app) { - try { - return require(get_build_json_path(app)); - } catch (e) { - // build.json does not exist - return null; - } -} - function delete_file(path) { if (fs.existsSync(path)) { fs.unlinkSync(path); @@ -177,8 +166,6 @@ module.exports = { apps_path, bundle_map, get_public_path, - get_build_json_path, - get_build_json, delete_file, run_serially, get_cli_arg, From e980de2788427b9324ea16c2fd532d7da4b3a495 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Wed, 18 Dec 2024 18:16:47 +0530 Subject: [PATCH 2/2] fix(esbuild): bug that caused apps to json to not get updated when --using-cached --- esbuild/esbuild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbuild/esbuild.js b/esbuild/esbuild.js index 4591f0a145..1c4ffa0ada 100644 --- a/esbuild/esbuild.js +++ b/esbuild/esbuild.js @@ -144,7 +144,7 @@ async function update_assets_json_from_built_assets(apps) { const assets = await get_assets_json_path_and_obj(false); const assets_rtl = await get_assets_json_path_and_obj(true); - for (const app in apps) { + for (const app of apps) { await update_assets_obj(app, assets.obj, assets_rtl.obj); }