Reputation: 1471
I have a grails 3 app with angularjs for front end.
Directory structure grails-app/assets/angular-app
. All the UI modules are in angular-app
directory. Its working fine when i do grails run-app
, but when i build war, files with extension *.tpl.html
is not packaged.
Example: I have a directory called common which has layout.js
and layout.tpl.html
in angular-app/. In war i have only layout.js
and layout.js.gz
files not layout.tpl.html
.
build.gradle
assets {
minifyJs = true
minifyCss = true
}
I tried adding includes = ["**/*.tpl.html"]
inside assets{..}
and also tried with grails.assets.includes = ["**/*.tpl.html"]
in application.groovy file.
Upvotes: 2
Views: 191
Reputation: 11
In your example that there would be a name conflict. layout.tpl.html is transformed into layout.js so that would be the 1st thing to change.
But I was having a related issue in that template files weren't being processed at all
If you (or anyone else coming here is seeing the same thing), it was happening when I was doing :
gradle war
but changing that to:
grails package
Resolved it.
Even though we aren't using executable wars, it now deploys and runs in tomcat correctly with the compiled templates.
Upvotes: 1