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?
This commit is contained in:
18alantom 2024-01-19 15:10:57 +05:30
parent 7a68ebe3a4
commit 60fb4f6d22

View file

@ -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");