Importing asset as minify js script
-
Hello,
Im having problem to import the surveyjs lib as a minify js file into the html handlebars template.
It's working pretty well when im using the unpkg src url but we want to have a copy of it into the app to prevent any displacement of file location or possible drop of version on the surveyjs side.I build up an example on the playground : https://playground.jsreport.net/w/anon/u73sr9L_
Would be very appreciate if you can help me to understand what im doing wrong (syntax or whatever)Thank you in advance and let me know if you need any extra information
-
My jsreport version is v2.10.0
-
hi @ABoudreault94 the issue with the
survey.jquery.v1.0.68.min.js
is that it contains some text that looks like handlebars blocks, so handlebars tries to process it.the easiest fix is to use the handlebars raw blocks to mark that the asset content should not be processed by handlebars
{{{{rawContent}}}} {#asset survey.jquery.v1.0.68.min.js @encoding=utf8} {{{{/rawContent}}}}
function rawContent (options) { return options.fn() }
see updated playground demo
-
Thank you @bjrmatos for the explanation and the solution.