Here is a quick test:
* Test tangle will auto expand and substitute :var
#+begin_src js :tangle kk.js
console.log("hello, world!");
#+end_src
#+begin_src js :var name="chris" :tangle require-kk.js
// require("kk.js");
console.log("Hi, ", name);
#+end_src
#+RESULTS:
: Hi, chris
#+NAME: check whether tangle expand and substitute :var
#+begin_src shell
cat require-kk.js
#+end_src
#+RESULTS: check whether tangle expand and substitute :var
: var name="chris";
: console.log("Hi, ", name);
The upper result should be: ~console.log("Hi, ", "chris");~.