I wanted to use @script with an additional defer parameter.
This PR enables using @script('script.js', defer).
To achieve this, the directive extracts $expression into $script and $defer variables which are returned in the right place to assemble the resulting <script ....></script> tag.
I wanted to use @script with an additional
defer
parameter.This PR enables using @script('script.js', defer).
To achieve this, the directive extracts
$expression
into$script
and$defer
variables which are returned in the right place to assemble the resulting<script ....></script>
tag.