Problem igrating from v13 build.jso to v14 esbuild

Hi,
I’m migrating a custom application I developed from Frappe 13 to Frappe 14. I have a custom js and css in the build.json
My build.json looks like this:
{
“css/custom_ppctool_style.css”: [
“public/css/custom_ppctool_style.css”
],
“css/buttons.dataTables.min.css”: [
“public/css/buttons.dataTables.min.css”
],
“css/jquery.dataTables.min.css”: [
“public/css/jquery.dataTables.min.css”
],
“js/custom_ppctool_functions.js”: [
“public/js/custom_ppctool_functions.js”
],
“js/buttons.flash.js”: [
“public/js/buttons.flash.js”
],
“js/buttons.html5.js”: [
“public/js/buttons.html5.js”
],
“js/buttons.print.js”: [
“public/js/buttons.print.js”
],
“js/jquery.dataTables.js”: [
“public/js/jquery.dataTables.js”
],
“js/jszip.js”: [
“public/js/jszip.js”
],
“js/dataTables.buttons.js”: [
“public/js/dataTables.buttons.js”
]
}

The file custom_ppctool_functions.js contains a function that decorates an html table with a bootstrap table allowing users to download data as csv or excel.

Following the steps available here Migrating to Version 14 · frappe/frappe Wiki · GitHub
I renamed the files under public/js replacing “.js” with “.bundle.js” and included them in the hooks.py
app_include_js = [
“jquery.dataTables.bundle.js”,
“dataTables.buttons.bundle.js”,
“buttons.flash.bundle.js”,
“buttons.html5.bundle.js”,
“buttons.print.bundle.js”,
“loader.bundle.js”,
“custom_ppctool_functions.bundle.js”]

web_include_js = [
“jquery.dataTables.bundle.js”,
“dataTables.buttons.bundle.js”,
“buttons.flash.bundle.js”,
“buttons.html5.bundle.js”,
“buttons.print.bundle.js”,
“loader.bundle.js”,
“custom_ppctool_functions.bundle.js”]

I also applied the steps for the css files.

The command bench build looks like it is building all assets

ppctool/dist/js/
├─ buttons.flash.bundle.JANTO4G5.js 328.30 Kb
├─ buttons.html5.bundle.5IRTC6SH.js 327.12 Kb
├─ buttons.print.bundle.JWNRJLNY.js 304.19 Kb
├─ custom_ppctool_functions.bundle.KKWTEJDP.js 172.58 Kb
├─ dataTables.buttons.bundle.NFLKHVMZ.js 200.98 Kb
├─ jquery.dataTables.bundle.5P4R3VCX.js 172.03 Kb
├─ jszip.bundle.NFEAMQHF.js 102.99 Kb
└─ loader.bundle.R5JY5CEO.js 65.38 Kb

ppctool/dist/css/
└─ ppctool.bundle.ZOHIDTZK.css 26.28 Kb

ppctool/dist/css-rtl/
└─ ppctool.bundle.G2DIUFBZ.css 26.31 Kb

but unfortunately the functions are not available and I get this error when calling this function
ReferenceError: transformTableToDataTable is not defined

Do I miss anything?
Thanks for your support
Massimiliano

Hi there, any hints from anyone?
Stepping a little bit back, I’m getting crazy trying figuring out how to include a custom function written in the file custom_ppctool_functions.bundle.js:

function testLinking(){
console.log(“test”);
}

and calling it inside a js of a doctype; when I call it I get Reference error testLinking is not a function.
Since the bundle is included in the hooks.py, in principle it should be included and be visibile, is that right?
I also get the same error when I try the lazy loading appoach and calling it from frappe.require
Any hints? What am I missing?
Thank you