chore(build): properly generate depndencies on tpl modules

Closes #365