chakri
1
Hello,
The scenario: I have a js resource which I need to minify and print directly inside template. Is this possible? Something like the below:
{{ $stringified_js = (resources.Get "JSFileName" | minify).ToString }}
Converting a resource to string or being able to print a resource is what I’m looking for.
Thank you
pamubay
2
Yes, you can.
{{ $stringified_js := resources.Get "JSFileName" | minify }}
<script>
{{ $stringified_js.Content | safeJS }}
</script>
2 Likes
chakri
3
Thank you so much @pamubay 
system
Closed
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.