Helpers from asset - what am I missing here?
-
I've tried to follow Registering helpers from assets, but obviously I'm missing something. This is my studio:
myHelpers.js looks like this:
-
You need to specify a proper relative or absolute path. Because now the asset is searched in the same folder as the template.
Like
await jsreport.assets.registerHelpers('/Aika/f***s/helpers/myHelpers.js') or await jsreport.assets.registerHelpers('../../f***s/helpers/myHelpers.js')`
-
Thank you very much for your quick reply. I believe that the reason why I didn't think of this is because elsewhere it's sufficient to use the name of the asset
<head> <style> {{asset "pdf-styles.css" "utf8"}} </style> </head>