In fact, this has nothing to do with the Smarty version. But the way you assign a variable is wrong. Try as follows:
{assign var="module_js" value="js/`$module`.js"} {if file_exists($module_js)} <script type="text/javascript" src="{$module_js}"></script> {/if}
source share