Bench build with custom $.extent DONT include ERPnext public js

Hey guys,

Iam trying to replicate the same login of Supplier / Address

myapp
  -public
    -js
      templates
        some_list.html
      eso.js

eso.js includes the following

frappe.provide("erpnext.utils");

$.extend(erpnext.utils, {

    render_subbom: function(frm) {
		$(frm.fields_dict['subbom_html'].wrapper)
			.html(frappe.render_template("sub_bom_list",
				  cur_frm.doc.__onload))
			.find("#btn-subbom_btn").on("click", function() {
				frappe.new_doc("Sub BOM");
			});
	},
})

my build.json

{
    "js/erpnext.min.js": [
        "public/js/eso.js",
        "public/js/templates/sub_bom_list.html"
    ]
}

After bench build I can use only my new ‘render_subbom’ but Supplier / Address is breaking due missing js function.

Any ideas on how I can add my own extend function without breaking the core ?