From 60fb4f6d224f2ed5b42e082352143d8fb7d9c142 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Fri, 19 Jan 2024 15:10:57 +0530 Subject: [PATCH] fix(Build): reinit app_path, avoid get_app_path frappe/esbuild seems like a ticking timebomb, I have not seen so many global variables since 2nd year of engineering. The function get_app_path just returns a value from an object that is initialized when the file is imported. Why is it a function in the first place. What lawless idiocy is this? --- esbuild/esbuild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbuild/esbuild.js b/esbuild/esbuild.js index 581a4ed2b0..c64b68fc3d 100644 --- a/esbuild/esbuild.js +++ b/esbuild/esbuild.js @@ -158,7 +158,7 @@ async function update_assets_json_from_built_assets(apps) { } async function update_assets_obj(app, assets, assets_rtl) { - const app_path = get_app_path(app); + const app_path = path.join(apps_path, app, app); const dist_path = path.join(app_path, "public, dist"); const files = await glob("**/*.bundle.*.{js,css}", { cwd: dist_path }); const prefix = path.join("/", "assets", app, "dist");