Include custom JS file

hi, I am trying to include custom js files via include custom file /home/frappe/frappe-bench/apps/frappe/frappe/hooks.py but for some reason they won’t update on the update despite restarting, etc

bench clear-cache did the trick, wonder why it won’t automate as I am in developer mode.

You need to manually clear cache when you change hooks. That is the design

I want to send sales invoice pdf to customer So when I clicked on email there should be recipients email id by default which is as a email -id for that customer in its billing address.
for this I try to overrides …/apps/frappe/frappe/public/js/frappe/views/communication.js for my app but it does not work .I also modify hooks.py
app_include_js = “/assets/techseria/js/frappe/views/communication.js”
it shows error on the first line which is
import localforage from “localforage”;
please guide me as I am new to frappe/ERPNext
or suggest any better way to do my task
Thanks in advance