I have a few JS functions in the main-entry JS file that are called only by HTML menus after user interaction, and obviously esbuild thinks that they are not used, like so:
HTML:
<a id="ndb" onmouseenter="keeptopbar()" onmouseleave="reltopbar()" onclick="askuser('newform')">FORM</a>
script.js:
function askuser(inpv) {
var st = "";
if (inpv === 'newform'){
EDIT: I tried to add "export" on those functions but it didn't work.
Is there an option to include in package.json in order to make esbuild include all functions found in the main-entry JS file, or any other trick?