Closed DontPlayTheGame closed 4 years ago
Issue can be closed! I missed the part If you want settings to apply to both development runtime and build time the properties have to be duplicated in your applications application.yml ... in the documentation.
I am using Grails 3.3.2 build.gradle was:
In application.groovy i had:
hbs-Files are in /assets/javascripts/handlebars In a gsp:
===== Using this configuration worked fine for development. The precompiled template was fine:
BUT in the productive environment this was changed to:
So I always get the error "Handlebars.template.myTemplate is not a function" After many tries i figured out this: Removing the "grails { assets { handlebars {" block form application.groovy. Change build.gradle to:
Now: i have the same precompiled code in development and production:
I can now call var hbTemplate = "'handlebars/myTemplate'";
But this is not how templateRoot should work?!?